d3-queue is a lightweight library for evaluating asynchronous tasks with configurable concurrency. Current stable version is 3.0.7, released in 2018. It is a standalone module of the D3 ecosystem, offering a minimal footprint (about 700 bytes gzipped vs 4,300 for Async.js). Key differentiators include small size, simple API via defer/await/awaitAll, abortable tasks, and first-class support for Node.js callback patterns. It is suitable for controlling parallel task execution in both browser and Node.js environments.
npm install d3-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency limit 2, defers three tasks, and calls awaitAll to process results.
Upgrade Node.js to version 6 or later, or use d3-queue v2.
Install d3-collection as a peer dependency when using v2, or upgrade to v3.
Consider migrating to async/await patterns or libraries like p-limit for modern use.
Use callback(null, [value1, value2]) or callback(null, { a: 1, b: 2 }).Ensure tasks implement abort logic to cleanly terminate.
Run 'npm install d3-queue' or add to package.json.
Use 'import { queue } from 'd3-queue'' or 'const { queue } = require('d3-queue')'.Use q.await(callback) for single result or q.awaitAll(callback) for array of results.
Ensure that defer takes a task function (with callback as last argument) and await/awaitAll takes a callback function.