onthegrid

0.0.2 • Public • Published

onthegrid

Installation

npm install onthegrid

Usage

onthegrid([interval in ms])

Usage is pretty straightforward. onthegrid uses the EventEmitter pattern and has two events: "online" and "offline". Each event is emitted in their respective situations. onthegrid checks at a predetermined rate of either 30 seconds, or whatever value you chose in milliseconds.

Example Usage:

const onthegrid = require('onthegrid');

grid = onthegrid();

grid.on('offline', () => {
    console.log('we are off the grid!');
});

/onthegrid/

    Package Sidebar

    Install

    npm i onthegrid

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • eliellis