A Node.js library for rate-limiting asynchronous function executions using a queue of worker functions. Each task returns a Promise that resolves when a worker becomes available. Version 0.0.30 is the latest stable release; the library is mature with low release cadence (last update 2019). It offers both a simple wrapper for existing functions and a lower-level API with explicit queue and worker management. Unlike more opinionated rate limiters, it does not enforce any concurrency model beyond a configurable number of workers.
npm install queue-promisedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to wrap a function with a concurrency limit of 5 workers, then execute multiple tasks. Each call returns a Promise that resolves when a worker is free.
Always attach .catch to every queue.push() or wrapper() call.
Prefer using the wrapper() API which is more reliable.
Ensure every worker function returns a Promise or a non-undefined value.
Implement your own persistence if needed, or use a database-backed queue.
Use require() instead: const { wrapper } = require('queue-promised');Run npm install queue-promised or yarn add queue-promised.
Use limitedFunction(time).then(data => console.log(data))
No dependency data recorded yet.