Check if the internet connection is up
npm install --global is-online-cli
$ is-online --help
Usage
$ is-online
Options
--timeout Seconds to wait for a server to respond (Default: 5)
Example
$ is-online
โ Online
Exit code 0 if online and 1 if offline.
- is-online - API for this package