is-app-online
A javascript module to check the internet connectivity periodically to control the flow of app and restrict crashing of application.
Installation
You can install this module through NPM using the following command in your terminal:
$ npm install is-app-online --save$ yarn add is-app-online
Syntax
;
Defaults
- If you won't pass any options, following defaults be taken to run the availability checks.
timeout: 10000 retries: 10 domainName: 'google.com' host '8.8.8.8' port: 53
Example
am-i-online requires Promises to work correctly. It's easy to use:
; // Most easy way;