
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@r-token/batch
Advanced tools
Simple async batch with concurrency control and progress reporting. Forked from [visionmedia/batch](https://github.com/visionmedia/batch). All this fork does is update the reference to the nonexistent 'emitter' package so it bundles properly with esbuild.
Simple async batch with concurrency control and progress reporting. Forked from visionmedia/batch. All this fork does is update the reference to the nonexistent 'emitter' package so it bundles properly with esbuild.
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install @r-token/batch
var Batch = require('@r-token/batch')
new Batch([...fns])
Create a new Batch.
batch.concurrency(n)
Set concurrency to n
.
batch.end([cb])
Execute all queued functions in parallel, executing cb(err, results)
.
batch.push(fn)
Queue a function.
batch.throws(throws)
Set whether Batch will or will not throw up.
progress
eventContains the "job" index, response value, duration information, and completion data.
{ index: 1,
value: 'bar',
pending: 2,
total: 3,
complete: 2,
percent: 66,
start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
duration: 0 }
var Batch = require('@r-token/batch')
, batch = new Batch;
batch.concurrency(4);
ids.forEach(function(id){
batch.push(function(done){
User.get(id, done);
});
});
batch.on('progress', function(e){
});
batch.end(function(err, users){
});
FAQs
Simple async batch with concurrency control and progress reporting. Forked from [visionmedia/batch](https://github.com/visionmedia/batch). All this fork does is update the reference to the nonexistent 'emitter' package so it bundles properly with esbuild.
We found that @r-token/batch 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
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.