npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

allow2

v1.2.0

Published

Free and Powerful Parental Freedom for your apps and devices

Readme

Allow2 - Free and Powerful Parental Controls for your apps and devices

npm package

Build Status Coverage Coverage Dependency Status Known Vulnerabilities Join the chat at https://gitter.im/Allow2/Allow2node

Allow2 makes it easy to add parental controls to your apps.

  1. Why should you use Allow2?
  2. Installation
  3. Concepts
  4. Usage
  5. Playing

Why should you use Allow2?

We remove friction and barriers to entry. Parents are scared of technology and not being able to avoid screen-time addiction or have their children gaming instead of doing homework and chores. GIVE THEM the ability to be in control which will INCREASE your user base and INCREASE your paying users.

But good parental controls are incredibly complex and difficult to get correct, and for a parent there is nothing worse than having to log in or open up yet another parental control interface on another app and reconfigure it every other day.

Allow2 solves these problems once and for all:

  1. Leverage the powerful Allow2 platform completely for free (no developer licensing fees)
  2. Add parental controls in a matter of hours and don't worry about implementing heaps of interfaces.
  3. Show your community responsibility and support parents, this helps to bring more users to your apps.

Really, you should be able to add extensive and powerful parental controls to your apps in a matter of hours or (at most) a couple of days.

The best part is it's not only powerful, but completely free for developers and manufacturers.

Try it out

Test Allow2 in your browser: https://npm.runkit.com/allow2

Use the Allow2 server to create a parent account and add children: https://app.allow2.com

Installation

npm install --save allow2

Concepts

The APIs for Allow2 operate in 2 modes.

DEVICE MODE

In this first API mode, you pair the device or app with the Allow2 Service and use that pairing credential to report all usage.

This mode is used for toasters, lights, routers, gaming consoles, apps, etc. Things that are typically owned by one account or family.

To use this mode, you pair the device/app FIRST and you supply the pairing credentials to the "check" call.

SERVICE MODE

Inthis second API mode, you instead typically only install it once, and it is for service-based systems, social media platforms, web sites, etc. These are not owned by any one family or account, but are used by potentially thousands of people that may not be related (Facebook, Twitter, www.google.com, youtube, etc).

To use this mode, you create a key/secret pair on the Allow2 Developer portal and supply the serviceID and Secret Key to the "check" call.

Usage

There are essentially 2 steps to usage:

  1. pair with the platform (see the example)
  2. use the "check" routine to check permissions and log usage.

With Allow2 all you have to do to check if something can be used and record it's usage is:

var allow2 = require('allow2');
allow2.check({
    userId: 1,
    pairToken: "98hbieg87-ilulieugil-dilufkucy",
    deviceToken: "iug893-kjg-fiug23",
    tz: 'Australia/Brisbane', // note, timezone is crucial to correctly calculate allowed times and day types
    childId: 10,
    activities: [
        { id: 1, log: true },		    // 1 = Internet
        { id: 2, log: true },           // 2 = Conputer
        { id: 3, log: true },           // 3 = Gaming
        { id: 8, log: true }            // 8 = Screen Time - see all "activities" at https://developer.allow2.com
    ],
    log: true                   // use this to say you want usage recorded (logged) as well as checked
    //, staging: true           // specify staging environment (BETA - use at your OWN risk)
}, function(err, result) {
    ... // this is the callback with results of the check
});

Callback:

function callback(err, result) {
    // result = { allowed: true,
            activities: { '7': [Object], ... },
            dayTypes: { today: [Object], tomorrow: [Object] }
    // },
    if (err) {
        // can look into the err object to determine what action to take, do you allow usage?
        // (Children may deliberately kill internet to get free use), or do you require access?
        // Or do you give a grace period and cache the last response while offline?
        return;
    }
    // result.allowed: true/false  // this is the macro feedback on approved/denied.
    // you can dig in to the result.activities object to see the restrictions and bans/etc on each activity,
    // determine when times will run out or next be available and how much quota is remaining for each activity.
    
    // result.dayTypes provides details on what day type it is today and tomorrow.
}

Playing

The best way to 'play' with the sdk and get familiar with it is via the runkit: https://npm.runkit.com/allow2