connectivity
v1.0.1 online offline detect network up down connected ping on-line and 4 more...
connectivity
Detect if the network is up (do we have connectivity?)
The module answers the most important question: is the cat-picture delivery system working?
usage
var connectivity = require('connectivity')
connectivity(function (online) {
if (online) {
console.log('connected to the internet!')
} else {
console.error('sorry, not connected!')
}
})
Also works in the browser with browserify!
license
MIT. Copyright Feross Aboukhadijeh.
npm i [email protected]
Metadata
- MIT
- Whatever
- Feross Aboukhadijeh
- released 3/2/2018