
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
Bike shed queing module using closures for augmenting each result. All jobs are run in series one at a time.
There are many, many other queueing modules out there, so why queuealot? Queuealot gives you the freedom to work with and augment each result from each job on the queue as they come in (see more below).
npm install queuealot
var queuealot = require('queuealot')
// initialize a new queue
var queue = queuealot(function (err, results) {
if (err) throw err
console.log(results) // => ['foo']
})
// add a job to the queue
queue(function (callback) {
// do your stuff here and call the callback when done with an optional
// error and the result
callback(null, 'bar')
})
Gotcha: Add all the jobs to the queue before the next tick. The queue expects that all jobs are added to the queue within the same tick as the queue was initialized. On the next tick the queue will run, execute all jobs on the queue and call the final function given when initialized.
Ok the above example isn't really that useful. Let's instead say you are reading a bunch of files and want to know the filename that generated each result:
var queuealot = require('queuealot')
var fs = require('fs')
var queue = queuealot(function (err, files) {
if (err) throw err
files.forEach(function (file) {
console.log(file.path)
console.log(file.body)
})
})
queue(function (callback) {
var path = '/path/to/file.txt'
fs.readFile(path, function (err, data) {
if (err) return callback(err)
callback(null, { path: path, body: data })
})
})
queue(function (callback) {
var path = '/path/to/other/file.txt'
fs.readFile(path, function (err, data) {
if (err) return callback(err)
callback(null, { path: path, body: data })
})
})
MIT
FAQs
Bike shed queing module using closures for augmenting each result
The npm package queuealot receives a total of 1 weekly downloads. As such, queuealot popularity was classified as not popular.
We found that queuealot 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.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.