
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A lightweight JavaScript module for managing setTimeout and setInterval timers. This module works in both Node.js and the browser, providing an easy-to-use API for creating, clearing, and managing timers.
You can install timerpro via npm:
npm install timerpro
Or simply include it in your project by adding the JavaScript file.
The timerpro module allows you to set and manage named setTimeout and setInterval timers. You can also clear, reset, and clear all timers using the provided methods.
const timerPro = require('timerpro');
Include the script in your HTML file:
<script src="https://cdn.jsdelivr.net/npm/timerpro/dist/timerpro.min.js"></script>
Then, access it via timerPro:
timerPro.setTimeout("example", () => console.log("Hello!"), 1000);
timerPro.setTimeout(name, func, delay, args = [])Creates a new setTimeout timer.
Parameters:
name (string): The timer name.func (function): The function to execute after the delay.delay (number): Time in milliseconds before the function is executed.args (array): Optional arguments to pass to the function.Returns: The ID of the created setTimeout.
timerPro.setInterval(name, func, delay, args = [])Creates a new setInterval timer.
Parameters:
name (string): The timer name.func (function): The function to execute repeatedly.delay (number): Time in milliseconds between function executions.args (array): Optional arguments to pass to the function.Returns: The ID of the created setInterval.
timerPro.clearTimeout(name)Clears a setTimeout timer by name. If name is not provided, all setTimeout timers will be cleared.
name (string, optional): The timer name.timerPro.clearInterval(name)Clears a setInterval timer by name. If name is not provided, all setInterval timers will be cleared.
name (string, optional): The timer name.timerPro.clearAll()Clears all setTimeout and setInterval timers.
Here's an example demonstrating how to use timerpro:
const timerPro = require('timerpro');
// Set a timeout
timerPro.setTimeout("MyTimeout", (i, msg) => {
console.log(`${i} - ${msg}`);
}, 5000, [1, "Hello World!"]);
// Set an interval
timerPro.setInterval("MyInterval", (i, msg) => {
console.log(`${i} - ${msg}`);
}, 2000, [1, "Repeating Message"]);
// Clear the timeout
timerPro.clearTimeout("MyTimeout");
// Clear the interval
timerPro.clearInterval("MyInterval");
// Clear all timers
timerPro.clearAll();
FAQs
Manage intervals and timeouts like a pro
We found that timerpro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.