Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
fun-dispatcher
Advanced tools
Readme
Tiny ES6 class to run functions after a given delay. Uses just one timer at any time and setImmediate
to execute functions.
Written in Typescript, 100% test coverage, targeting current LTS Node.JS
Example:
const { Scheduler } = require('fun-dispatcher');
const fd = new Scheduler();
fd.schedule('task1', () => { console.log('Will run after about 600ms') }, 600);
fd.schedule('task2', () => {
console.log('Tasks can be cancelled by id');
fd.delete('task1')
}, 400)
// can forcefully execute all tasks
fd.flush();
// or just next task in line waiting for be executed
fd.runNext()
// Scheduler extends native Map class, so, all methods are available
// like .delete to unschedule task or iteration
for (const [task, { delay }] of fd) {
console.log('Task `%s` was scheduled with original delay of %d ms', task, delay);
}
FAQs
Tiny ES6 class to run functions after a given delay. Uses just on timer at any time and setImmediate to launch
The npm package fun-dispatcher receives a total of 284 weekly downloads. As such, fun-dispatcher popularity was classified as not popular.
We found that fun-dispatcher 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
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.