0.3.1 • Published 10 months ago

client-online-status v0.3.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

client-online-status

Client Online Status Checker

Greenkeeper badge

NPM Version NPM Downloads

Overview

This is a tool for checking if the user (client) is currently online on various platforms like web browsers, mobile devices etc., displaying real-time updates via console logs or customized UI elements in your applications.

Installation

To install it as an npm dependency:

npm install client-online-status

Usage

To use it in your project, import it at the top of your JavaScript file(s) and initialize with required settings.

Example (displaying status on console):

const { clientOnlineStatus } = require('client-online-status');

document.addEventListener('DOMContentLoaded', function() {
  clientOnlineStatus();
  setInterval(function() {
    if (window.CONNECTION_STATE == 'CONNECTED') {
      console.log('You are online');
    }
  }, 1000);
});
0.3.0

10 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.3.1

10 months ago

0.1.0

11 months ago