A lightweight concurrency-limited async queue based on Promises, implementing a mapLimit pattern similar to async.mapLimit. Version 0.0.3 provides a simple API to control the maximum number of concurrent async operations. It is dependency-free and designed for node.js and browser environments where Promise-based concurrency control is needed. Compared to alternatives like p-limit or async.queue, it offers a minimal API surface with a single QueueMapLimit class that takes a limit and an add method accepting an array and iteratee.
npm install queue-maplimitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency limit 2, processes an array with an async iteratee doubling each value, and logs results.
Handle rejection in .catch() or wrap iteratee to never reject.
Ensure limit is a positive integer: new QueueMapLimit(5).
Convert to array first: queue.add([...iterable], iteratee).
Use const QueueMapLimit = require('queue-maplimit') or import QueueMapLimit from 'queue-maplimit'.Add .catch() to the add() promise or ensure iteratee never throws.
Instantiate the queue: const queue = new QueueMapLimit(5);
No dependency data recorded yet.