Nacho Portmanteau Meltdown
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

connectivity

1.0.1 • Public • Published

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.

install

npm i connectivity

Downloadsweekly downloads

1,076

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability