Bluebird
Feature-rich promise library for Node.js offering concurrency controls, promisification, and long stack traces.
Official Documentation ↗v3. Check the official docs for the latest API surface.Installation
npm install bluebirdpnpm add bluebirdMethods
No methods match this filter.
Overview
Bluebird is a feature-rich promise library offering bounded concurrency, promisification of callback APIs, and improved async debugging. This reference lists the most frequently used APIs with accurate signatures and runnable snippets.
Core APIs
Promise.map— Maps over items with a bounded number of concurrent operations, preserving order.Promise.promisify— Wraps a Node-style callback function so it returns a promise.Promise.delay— Resolves with the optional value after the given delay, useful for backoff.
Example
const Promise = require('bluebird');
const results = await Promise.map(urls, fetchOne, { concurrency: 4 });
console.log(results.length);
Notes
Long stack traces add overhead, so enable them mainly in development. Concurrency helpers are the main advantage over native promises.
Verification
Run Promise.map over ten items with concurrency 2 and confirm the observed peak in-flight count never exceeds two.
API reference evidence
Fetched from official sources on 2026-11-08T19:22:00+08:00 via WebFetch http://bluebirdjs.com/docs/api-reference.html;WebFetch https://bluebirdjs.com/docs/api/promise.map.html;WebFetch http://bluebirdjs.com/docs/api/promise.promisify.html;WebFetch http://bluebirdjs.com/docs/api/promise.delay.html.
Promise.map→ signature from https://bluebirdjs.com/docs/api/promise.map.html; official text: “Promise.map( Iterable|Promise<Iterable > input, function(any item, int index, int length) mapper, [Object {concurrency: int=Infinity} options] ) -> Promise” Promise.promisify→ signature from http://bluebirdjs.com/docs/api/promise.promisify.html; official text: “Promise.promisify( function(any arguments…, function callback) nodeFunction, [Object { multiArgs: boolean=false, context: any=this } options] ) -> function”Promise.delay→ signature from http://bluebirdjs.com/docs/api/promise.delay.html; official text: “Promise.delay( int ms, [any|Promisevalue=undefined] ) -> Promise”
FAQ
- Do I still need Bluebird with native promises?
- Native promises cover common cases, but Bluebird still offers bounded concurrency helpers, promisification, and richer debugging that native promises lack.
- How do I limit concurrency for many tasks?
- Use Promise.map with the concurrency option, which runs at most that many mappers at once.
- How do long stack traces help?
- Enable them with Promise.config({ longStackTraces: true }) so async chains report the originating call site.
Report a problem with this API docOpens a pre-filled issue on GitHub.