ESM-only, dependency-free async queue for Node.js and browsers. Version 0.2.2 (released 2024). Processes n tasks concurrently, starting immediately on push. Includes TypeScript definitions and event subscriptions (idle, taskProcessing, taskProcessed, taskPushed). No dependencies. Lightweight alternative to async.queue or p-limit.
npm install esm-async-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency 2, pushes three async tasks, and subscribes to the 'idle' event.
Use 'tasksProcessing' and 'tasksPending' properties separately to track specific counts.
Unsubscribe only once per subscription; avoid double unsubscribe.
Wrap promises in a function: () => myPromise.
Change to import statement: import { Queue } from 'esm-async-queue'Use import { Queue } from 'esm-async-queue' (curly braces).No dependency data recorded yet.