it-queue (v1.1.3) is an async queue implementation built on top of p-queue, providing the ability to iterate over queue results using async generators. It ships TypeScript types and follows the 'it' family of packages focused on async iteration patterns. Key differentiators: aborting a task removes it from the queue, and results can be consumed via `for await...of` or `it-all`. Compared to p-queue, it-queue gives direct access to the underlying queue and supports iteration over completed items. The package is part of the libp2p/achingbrain ecosystem and is actively maintained.
npm install it-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency 2, adds three async tasks, and iterates over results using it-all.
Always iterate over the queue instance to process tasks. If you don't need the results, consider using a different queue library.
Pass `signal` as part of the second argument to `add()`: `queue.add(task, { signal })`.Use `AbortController` and pass `signal` to individual tasks instead of calling `queue.abort()`.
Use `for await (const result of queue)` or `await all(queue)`.
Start iterating over the queue (e.g., `for await...of queue`) immediately after adding tasks.
Handle the abort error in your task or catch it when iterating.
No dependency data recorded yet.