A minimalistic queue processor that emits events. Version 1.0.3 provides a simple batch-processing queue with configurable concurrency and an event-driven API (empty, error events). Key differentiators: lightweight, no dependencies, straightforward callback-based processing. Suitable for rate-limited or sequential task execution. Compare to async.queue or bull for simpler use cases. Low release cadence; last update unknown.
npm install queue-batchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a processor with concurrency 5, pushes tasks, and handles empty/error events.
Use concat(array) to enqueue multiple items from an array.
To stop processing, manage external flags in the callback.
Wrap callback body in try/catch and call next(error) on exception.
Use `const Processor = require('queue-batch'); new Processor(callback);`Attach an error listener: processor.on('error', (err) => console.error(err));Provide an array as third argument or omit it: new Processor(callback, 10, [])
No dependency data recorded yet.