🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

queue-cb

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-cb

A scalable queue for parallel callbacks

1.5.5
latest
Version published
Weekly downloads
7K
-49.97%
Maintainers
1
Weekly downloads
 
Created

queue-cb

A scalable queue for parallel callbacks.

The API is similar to https://github.com/d3/d3-queue, but without accumulating results in memory.

var Queue = require('queue-cb);

function delayedHello(callback) {
  setTimeout(function() {
    console.log("Hello!");
    callback(null);
  }, 250);
}

var q = new Queue();
q.defer(delayedHello);
q.defer(delayedHello);
q.await(function(error) {
  if (error) throw error;
  console.log("Goodbye!");
});

Documentation

API Docs

FAQs

Package last updated on 21 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts