
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.
minimal-queue
Advanced tools
Minimal FIFO queue implementation to be used for simple concurrency limiting scenarios.
Minimal FIFO queue implementation to be used for simple concurrency limiting scenarios.
npm install minimal-queue
Create a queue by passing a worker function that will be processed each time some arguments are enqueued. Optionally limit concurrency (default is 50) in order to limit number of jobs allowed to run at the same time.
var queue = require('minimal-queue')
, myQueue = queue.up (function (job) {
var that = this;
console.log('Starting ', job);
setTimeout(function () {
console.log('Processed %s. Calling done now to allow more jobs to run.', job);
that.done();
}, 200);
})
;
myQueue.concurrency = 2;
myQueue.allDone = function () { console.log('Yay, we are now out of jobs!'); };
myQueue.enqueue('first job');
myQueue.enqueue('second job');
myQueue.enqueue('third job');
Running the above produces the following output:
Starting first job
Starting second job
Processed first job. Calling done now to allow more jobs to run.
Starting third job
Processed second job. Calling done now to allow more jobs to run.
Processed third job. Calling done now to allow more jobs to run.
Yay, we are now out of jobs!
FAQs
Minimal FIFO queue implementation to be used for simple concurrency limiting scenarios.
We found that minimal-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.

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.