Skip to content

Detect if the network is up (do we have connectivity?)

License

Notifications You must be signed in to change notification settings

feross/connectivity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connectivity travis npm downloads javascript style guide

Detect if the network is up (do we have connectivity?)

internet!

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.

About

Detect if the network is up (do we have connectivity?)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published