API Reference

Bluebird

Feature-rich promise library for Node.js offering concurrency controls, promisification, and long stack traces.

Official Documentation ↗
CompatibilityThis documentation covers version v3. Check the official docs for the latest API surface.

Installation

npmnpm install bluebird
pnpmpnpm add bluebird

Methods

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.

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.