A lightweight TypeScript library providing an AsyncIterableQueue<T> class that implements both AsyncIterable<T> and async push/end methods. Version 1.0.16, released as needed with no fixed cadence. It allows producers to push items and consumers to iterate asynchronously using for-await-of. Unlike other async queue libraries, it integrates directly with JavaScript's async iteration protocol, supports TypeScript, and has zero dependencies. It requires Node.js >=14.17.5 and is ESM-only.
npm install async-iterable-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an AsyncIterableQueue, pushes two items, ends the queue, and consumes them with for-await-of.
Use import statements and ensure your project is configured for ESM (e.g., 'type': 'module' in package.json).
Ensure you call end() only after all pushes are complete, and handle rejection on push.
Always check if queue has ended before pushing, or catch errors.
Install with 'npm i async-iterable-queue' (s with 'async' not 'asyn').
Add 'type': 'module' to your package.json or use .mjs extension.
Use new AsyncIterableQueue<T>() to create an instance.
Use import { AsyncIterableQueue } from 'async-iterable-queue'.No dependency data recorded yet.