Skip to content
connectivity checker helpers for nativescript
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
index.js
package.json
readme.md

readme.md

Install

tns plugin add tns-conchecker

Params

lang: object containing:

  • error: error alert title || default: 'Error'
  • noInternet: error alert message || default: 'There is no internet connection'
  • ok: ok alert button text || default: 'OK'

API

ifInternet(fn,ifNot): if there is internet run fn() else run ifNot()

onlyWithInternet(fn): run fn() only if there is internet

You can’t perform that action at this time.