browser-activity-monitor
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

browser-activity-monitor Build Status NPM MIT

A simple activity monitor to alert you when the user becomes active or inactive

Installation

npm install browser-activity-monitor --save

Usage

import { ActivityMonitor, ACTIVE, INACTIVE } from 'browser-activity-monitor'
 
const monitor = new ActivityMonitor(document)
monitor.on(ACTIVE, () => console.log('User is active!'))
monitor.on(INACTIVE, () => console.log('User is inactive!'))
 
// ...
monitor.destroy()

Tests

npm test

License

Apache-2.0

/browser-activity-monitor/

    Package Sidebar

    Install

    npm i browser-activity-monitor

    Weekly Downloads

    4

    Version

    1.0.2

    License

    Apache-2.0

    Last publish

    Collaborators

    • bcherny