0.0.2 • Published 3 years ago

aif-online v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

aif-online

Simple method that checks if there is internet connectivity

Basically it is a method that checks if there is an available internet connection, returning a promise, in case of success true otherwise it will return false.

Installation

Download the library with npm / Yarn, from your local files.

Via NPM:

$ npm install aif-online

Via YARN:

$ yarn add aif-online

Use

The library can be included in your code through imports from CommonJS or ES.

ES2015 (ES6):

import online from "aif-online";

CommonJS:

var online = require("aif-online");

Example:

var online = require('aif-online');
online(function(success, err){
  if (success) {
    console.log('internet available');
  } else {
    console.log('internet not available', err)
  }
});

Tests

$ npm test

O well

$ yarn test

build

$ npm run build

O well

$ yarn build

Security contact information

To report security vulnerabilities, use the following link: https://github.com/mygnet/aif-online/issues


0.0.2

3 years ago

0.0.1

4 years ago