Registry / devops / async-function-queue

async-function-queue

JSON →
library1.0.0jsnpmunverified

Simple async function queue with configurable concurrency. Current stable version is 1.0.0. Maintained by yld.io. No significant release cadence. Key differentiators: minimal API, CommonJS only, callback-based, event-driven (entry, exit, drain events). Suitable for limiting concurrency of async operations.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This package is CommonJS only, does not support ES modules.

var Queue = require('async-function-queue');

Queue is a factory function, not a constructor. Do not use 'new'.

var queue = Queue(concurrency);

Pushed functions must accept a callback as the sole argument. Async functions with no callback parameter will not work.

queue.push(function(cb) { ... });

Creates a queue with concurrency 2, pushes 5 tasks, and logs drain event when all complete.

var Queue = require('async-function-queue'); var concurrency = 2; var queue = Queue(concurrency); var tasks = [1,2,3,4,5]; tasks.forEach(function(task) { queue.push(function(cb) { console.log('processing task', task); setTimeout(cb, 100); }); }); queue.on('drain', function() { console.log('all tasks done'); });
Debug
Known footguns
gotchaDo not use 'new' with Queue; it is a factory function.
gotchaPushed functions must accept a callback and call it when done. Async functions without callback parameter will hang the queue.
deprecatedThis package is not actively maintained; last release was long ago. Consider alternatives like async.queue or p-queue.
gotchaNo TypeScript types provided; library is JavaScript only.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources