New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

onthegrid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onthegrid

EventStream implimentation of online and offline internet connectivity.

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

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!');
});

Keywords

online

FAQs

Package last updated on 01 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts