Simple unbounded asynchronous producer-consumer queue (like Java's BlockingQueue) with promises. Version 1.1.0 is stable, last updated in 2016. Low maintenance, no breaking changes, ships TypeScript types. Differentiated by minimal API and no dependencies.
npm install consumer-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic producer-consumer pattern with push and pop methods.
Always ensure cancellation or termination logic, e.g., with cancelWait().
Always pass a meaningful error to cancelWait() to avoid silent failures.
Avoid pushing null values or use pop() with a sentinel.
Design for single consumer pattern or implement your own multi-consumer queue.
Use `import { ConsumerQueue } from 'consumer-queue'` for ESM.Run `npm install consumer-queue` and check import path.
Use `new ConsumerQueue()` after require.
No dependency data recorded yet.