idle-tracker-patched

0.0.7 • Public • Published

Idle Tracker

idle tracker


npm gzip size downloads Javascript library to track browser idle status. (callback when user is idle).

Demo

** Browser might the function natively in the future, see Idle Detection API

Installation

via yarn

$ yarn add idle-tracker

or via npm

$ npm install idle-tracker

Usage

import IdleTracker from 'idle-tracker';

const idleTracker = new IdleTracker(options);

idleTracker.start(); // start tracker

idleTracker.end(); // stop tracker and release memory

Constructor options

Options Name Type Default Description
timeout (ms) number 30000 timeout to count as idle
onIdleCallback Function noop Function to be called when idle status change, payload will be { idle: true/false }
throttle number 500 throttle rate of callback

Package Sidebar

Install

npm i idle-tracker-patched

Weekly Downloads

3

Version

0.0.7

License

MIT

Unpacked Size

8.4 kB

Total Files

7

Last publish

Collaborators

  • punund