connectivity
1.0.2 • Public • Published 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.
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.2
2,368
Version History
Package Sidebar
Install
Weekly Downloads