A lightweight, native ES6 promise queue library that supports concurrency, optional retry attempts for failed promises, and priority-based execution. Version 2.0.0 is the current stable release with an unknown release cadence. Unlike other promise queue libraries (e.g., p-limit or bottleneck), it offers built-in retry strategies and custom promise type support (e.g., Bluebird, Q). The library is primarily designed for Node.js and modern browsers with native Promise support.
npm install a-promise-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a queue with a completion callback, adding tasks with different delays and priorities, and handling rejections.
Use { promise: CustomPromise, concurrency: 3 } instead of { Promise: CustomPromise, Concurrency: 3 }.Check your option spelling: use { attempts: 3 } instead of { retries: 3 } or { attempts: 3 }.Understand that priority ordering only applies to tasks added before a flush. Use separate queues if you need priority across flushes.
Use default import: import PromiseQueue from 'a-promise-queue'; or const PromiseQueue = require('a-promise-queue');Ensure concurrency is a number and spelled correctly: { concurrency: 5 }Pass a valid Promise constructor as options.promise, e.g., require('bluebird') or use native Promise.No dependency data recorded yet.