getonline
v1.0.0
Published
listen to internet connection status
Maintainers
Readme
getonline
Install
npm i -D getonlineUsage
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
