
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

A queue with custom concurrency and time limits. Inspired by caolan/async#queue, but with variable number of arguments in the worker, events, and with optional time limits.
var TimeQueue = require('timequeue');
function worker(arg1, arg2, callback) {
someAsyncFunction(calculation(arg1, arg2), callback);
}
// create a queue with max 5 concurrency every second
var q = new TimeQueue(worker, 5, 1000);
// push tasks onto the queue
q.push(42, 24);
q.push(2, 74);
// optional callback when pushing tasks
q.push(2, 2, function(err) {
// task finished
});
Creates a new instance of a queue. Worker must be a function with a callback for its last argument. The callback must be called in order for the queue to know when the worker has finished a task. concurrency defaults to 1 and time to 1000. Meaning one task in the queue will be executed a maximum of one time per second. If time is set to 0, there will be no time limit.
worker, concurrency and time properties can later be edited on the queue instance.
Pushes a new task to the queue. Any number of arguments can be given. An optional callback can also be given as the last parameter. The callback will be called when the task is finished or if there was any error.
function (err) { }
Emitted when there is an error processing a task and a callback isn't given to the push method.
function () { }
Queue is full.
function () { }
Queue is empty, some tasks might still be running.
function () { }
Queue is empty and last task has finished.
npm install timequeue
Tests are written with mocha
npm test
MIT
FAQs
A queue with custom concurrency and time limits.
The npm package timequeue receives a total of 39 weekly downloads. As such, timequeue popularity was classified as not popular.
We found that timequeue 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.