A queue manager for concurrent promise execution with zero external dependencies. Provides fine-grained control over concurrency and error handling, supporting both function lists and item-based processing. Version 3.0.5 uses a config object and requires promises to be wrapped in functions to avoid early execution. Uses EventEmitter for event-driven flow. Suitable for batch processing or rate-limiting async tasks. Differentiators include zero dependencies, TypeScript types, and ability to cancel queue mid-execution.
npm install promise-queue-managerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with a promise function and an array of items, listens for processed events, and starts processing.
Change constructor call from 'new PromiseQueue(concurrence, shouldStopOnError)' to 'new PromiseQueue({concurrence, shouldStopOnError})'.Wrap each promise in a function: 'items.map(item => () => save(item))'.
Ensure your listener handles QUEUE_PROCESSED regardless of error handling setting.
Always wrap promises in arrow functions: '() => myPromise'.
If you need to abort async operations, implement cancellation logic in the promise functions.
Use 'import { PromiseQueue } from 'promise-queue-manager'' in ESM, or 'const { PromiseQueue } = require('promise-queue-manager')' in CJS.Use 'PromiseQueue.EVENTS' after importing PromiseQueue.
Ensure config includes either 'promises' (array of functions) or 'promise' + 'items'.
No dependency data recorded yet.