You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

idle-timer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idle-timer

Checks if a user is idle for a configurable amount of time and fires a callback

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
1.5K
-10.81%
Maintainers
1
Weekly downloads
 
Created
Source

idle-timer

Checks if a user is idle for a configurable amount of time and fires a callback

Build Status

Usage

var timer = idleTimer({
  // function to fire after idle
  callback: callbackFn,
  // function to fire when active
  activeCallback: activeCallbackFn,
  // Amount of time in milliseconds before becoming idle. default 60000
  idleTime: 5000
})
function callbackFn () {
  console.log("You're idle!");
}

// when no longer needed, destroy() will remove
// all of the event listeners and clear the timeouts
timer.destroy();

Keywords

idle

FAQs

Package last updated on 21 Jan 2017

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