Socket
Book a DemoInstallSign in
Socket

js-network-monitor

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-network-monitor

js-network-monitor ==================

1.0.9
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

js-network-monitor

Monitor internet connection with javascript

Install with bower

$ bower install --save js-network-monitor

Install with npm

$ npm install --save js-network-monitor

Usage

<!-- Compiled JavaScript -->
<script src="bower_components/dist/js-network-monitor.js"></script>

<script>
  var options = {
    url: '/favicon.ico', // default
    timeout: 3000, // default 3 seconds
    sleep_delay: 5000, // default 5 seconds
  };
  var js_network_monitor = new JsNetworkMonitor(options);
  js_network_monitor.on('online', function() {
      console.log('you are online.');
    }
  );
  js_network_monitor.on('offline', function() {
      console.log('you are offline.');
    }
  );
  js_network_monitor.start();
</script>

Keywords

js-network-monitor

FAQs

Package last updated on 07 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.