miniq is a tiny async control flow library for Node.js (v1.0.1) that implements parallelLimit with a concurrency-limited queue. It supports series, parallel, and limited-concurrency patterns by varying the limit parameter (1, Infinity, or a number). Its unique feature allows sharing a single concurrency-limited queue across multiple sets of tasks, each with its own completion callback. The library uses setImmediate to prevent stack overflows, configurable via maxStack property. It focuses on minimalism and avoids result-passing variants, relying on JavaScript scope. Compatible with Node 10.x and above.
npm install miniqNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use parallel() with concurrency limit of 2, tasks call done(), and onDone callback after all tasks finish.
Use exec() to add tasks; concurrency is set only via the limit parameter on initial call.
Upgrade to v1.0.1 or ensure tasks array is non-empty.
Set queue.maxStack = Infinity if all tasks are already asynchronous.
Capture results in shared variables via closures instead.
Use const parallel = require('miniq');Use polyfill or set queue.maxStack = Infinity to bypass setImmediate.
Ensure each task function receives (done) and calls done() or done(err) upon completion.
No dependency data recorded yet.