internet-available
A module to verify if there's an active internet connection with Node.js
Installation
You can install this module through NPM using the following command in your terminal:
$ npm install internet-available --save
Example
internet-available requires Promises to work correctly. It's easy to use:
var internetAvailable = ; // Most easy way;
But configurable too (check the docs).
Documentation
The official documentation of the project can be found in Our Code World here.