JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2771
  • Score
    100M100P100Q115869F
  • License MIT

A scalable queue for parallel callbacks

Package Exports

  • queue-cb

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (queue-cb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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!");
});