A minimal promise queue that ensures callbacks execute sequentially in order of addition. Current stable version is 1.2.3, with a simple API consisting of add(), done(), and count(). It is lightweight at 500 bytes gzipped and has no dependencies. This differs from larger queue libraries by focusing solely on promise-based serialization without concurrency control or priorities. The project is in maintenance mode with infrequent updates.
npm install queue-that-promiseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue, adds three promise-returning callbacks that log sequentially, and waits for all to complete.
Wrap the promise in a function: queue.add(() => myPromise)
Call queue.done() after all add() calls, or re-await done() after subsequent adds.
For parallel processing, use Promise.all or a library like p-limit.
Use const Queue = require('queue-that-promise'); const queue = Queue();Handle errors: queue.add(callback).catch(err => console.error(err));
const queue = Queue();
No dependency data recorded yet.