Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

time-events-manager

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

time-events-manager

View and Manage Javascript's timeout and interval collections

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
increased by111.53%
Maintainers
2
Weekly downloads
 
Created
Source

time-events-manager

View and Manage Javascript's timeout and interval collections

Installation

$ npm install time-events-manager --save

<script src="../dist/main.min.js"></script>

Usage

// creating a timeout

function myFunc(){
    console.log("Hello world");
}

var myTimeoutId = setTimeout(myFunc, 5000); 

// Managing timeouts via timeoutCollection object

timeoutCollection.get(0);
timeoutCollection.getById(myTimeoutId); //Both returning the timeout object created

timeoutCollection.getScheduled(); //Returns an array of timeout objects that have not yet executed
timeoutCollection.getCompleted(); //Returns an array of timeout objects that have been executed
timeoutCollection.getAll(); //Returns an array of timeout objects

timeoutCollection.remove(myTimeoutId);
timeoutCollection.removeAll();

Basically, you should inject the library script from in place you would like the collection to work on.

Why?

JavaScript will not expose us a simple object or array to view and manage all of our current time-events. This library exposes the timeouts and intervals in your current page. In addition, it makes it possible to manage those time-events in run-time.

Keywords

FAQs

Package last updated on 23 Feb 2018

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