1.0.0 • Published 6 years ago

getonline v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

getonline

Install

npm i -D getonline

Usage

var Online=require('getonline');
const internet=new Online({timeout:3000}) // default to 3s

internet.on('connected',function(){
      console.log('you are online !');
}) 

internet.on('disconnected',function(){
      console.log('disconnected...');
}) 

API

getonline(options)

options

Type: Object

timeout

Type: number Default: 5000

Milliseconds interval to check status again.

License

MIT © abdelhak akermi