
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
timeoutcontrol
Advanced tools
A JavaScript tool to imitate setTimeout functionality to extend control over it.
npm install timeoutcontrol
TimeoutControl accepts any parameters that the native setTimeout will accept.
const timeout = new TimeoutControl(callback[, delay[, param1, param2, ...]]);
Returns the id of the timeout.
Returns an array of all params (i.e., param1, param2, ...).
Returns the duration of the timeout.
Returns the time the timeout starts.
Returns the time the timeout is paused/stopped.
Returns the callback function to run when the timeout ends.
Returns the time left before the timeout ends.
Returns a boolean of whether the timeout has ended.
Pause the ongoing timeout.
Resume the paused timeout.
Restart the timeout from the beginning. .timeStart, .timeStop and .id will be updated.
Cancel the timeout. .done will be updated to true.
const duration = 5000;
const callback = function(){
console.log(...arguments);
}
const timeout = new TimeoutControl(callback, duration, 1, 2, 3, 4, 5);
/* ...SOME OPERATIONS / CONDITIONS */
timeout.pause();
/* ...SOME OPERATIONS / CONDITIONS */
timeout.resume();
/* ...SOME OPERATIONS / CONDITIONS */
timeout.clear();
/* ...SOME OPERATIONS / CONDITIONS */
timeout.restart();
FAQs
A JavaScript tool to control setTimeout operations.
The npm package timeoutcontrol receives a total of 11 weekly downloads. As such, timeoutcontrol popularity was classified as not popular.
We found that timeoutcontrol demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.