New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@certsy/universal-idle-timeout

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@certsy/universal-idle-timeout

universal-idle-timeout is based on the excellent [idleTimeout](https://github.com/jackmu95/idle-timeout/) which is a zero dependency, ~5KB library to make idle state detection in the browser an ease. universal-idle-timeout maintains a universal user actio

  • 0.2.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
increased by157.14%
Maintainers
4
Weekly downloads
 
Created
Source

universal-idle-timeout

universal-idle-timeout is based on the excellent idleTimeout which is a zero dependency, ~5KB library to make idle state detection in the browser an ease. universal-idle-timeout maintains a universal user action tracking system across all of the tabs by using localstorage. When localstorage is not available, it gracefully degrades to tracking the actions in the current tab.

Installation

Using npm

npm install @certsy/universal-idle-timeout

Using yarn

yarn add @certsy/universal-idle-timeout

Usage

idleTimeout is totally easy to use. All you basically need to do is:

idleTimeout(() => {
  // Do some cool stuff
});

Documentation

The idleTimeout constructor takes two arguments:

  • callback [Function] - The callback function
  • options [Object] - An optional options object
    • element [Element] - The element to listen for the timeout
    • timeout [Number] - The idle timeout (in milliseconds)
const instance = idleTimeout(
  () => {
    // Callback
  },
  {
    element: document,
    timeout: 1000 * 60 * 5
  }
);

FAQs

Package last updated on 02 Mar 2019

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc