Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hasinternet

0.0.1 • Public • Published

hasInternet

Node.js module for checking if user is connected to the internet.

To Use

Call the function hasInternet and give it a callback function, which takes in an error and a boolean for the true/false that will return for the internet's status. IS THERE INTERNET!?!

var hasInternet = require('hasinternet')
 
hasInternet(answer)
 
function answer(err, internet) {
  // there is either an error and false for internet
  // or false for error and true for internet
    // do what you need to do with that info!
  console.log(err, internet)
}

Keywords

none

install

npm i hasinternet

Downloadsweekly downloads

25

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability