
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
a-promise-queue
Advanced tools
This is just another promise queue. Simple.
You know this:
npm install a-promise-queue
queue = new PromiseQueue([Function callback], [Promise flavour])
Callback is fired whenever queue is emptied.
Optional flavour lets you set the type of promises used, defaults to es6 native promises.queue.length
Returns number of promises waiting to be executed.queue.add(Function generator, [Object options])
Returns a promise which is resolved or rejected when the promise produced by the generator is eventually resolved.
Example options:
{
attempts: number, // if promise fails it will retry this many times.
priority: number, // execution is ordered by priority default = 0.
}
var PromiseQueue = require('a-promise-queue');
var delay = (ms) => () => new Promise(resolve => setTimeout(resolve, ms));
var queue = new PromiseQueue(() => console.log('Queue is empty'));
queue.add(delay(100)).then(() => console.log('first this'));
queue.add(() => Promise.reject('then this fails')).catch((e) => console.log('Errored:', e));
queue.add(delay(10)).then(() => console.log('and this succeeds'));
queue.add(delay(10), { priority: 1 }).then(() => console.log('but not before this one jumps the queue.'));
FAQs
A native es6 promise queue with optional retry attempts.
The npm package a-promise-queue receives a total of 16 weekly downloads. As such, a-promise-queue popularity was classified as not popular.
We found that a-promise-queue 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.