checks for internet, works in browser and node
Node.js module for checking if user is connected to the internet.
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'hasInternetanswer// 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.logerr internet