hasinternet

checks for internet, works in browser and node

var hasInternet = require('hasinternet')

hasInternet(answer)

function answer(err, internet) { console.log(err, internet) }