Conchecker

by Abu Rawi

connectivity checker helpers for nativescript

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

STATS

4 downloads in the last month

0 downloads in the last week

0 downloads in the last day