Bluebird - Promise library with unmatched performance.

  •        68

Bluebird is a fully featured promise library with focus on innovative features and performance. Bluebird is built with the following design principles in mind:

  • Pragmatic and not theoretical. - Bluebird will always pick the pragmatic route vs the theoretically elegant one when there is a conflict. The library's API was created based on real-life use cases and after a lot of consideration.
  • Fully featured without bloat - Bluebird provides all the tools and utilities needed to realize a highly expressive and fluent DSL for asynchronous JavaScript without suffering from bloat by avoiding incorporating features that are solely motivated by theoretical arguments, have extremely narrow applicability or have limited synergy and composability with existing features.
  • Easy to debug - A major consequence of choosing pragmatism over theoretical elegancy, a property that among promise libraries taken to this extent is unique to bluebird.
    • Bluebird ships with the best cross-platform long stack traces out there and a warning system. This helps you recognize common and devastating promise usage mistakes early before they lead to hard to debug code later.
    • Unhandled errors are not silently swallowed by default but reported along with helpful stack traces where applicable. All of this is of course configurable.
  • Zero overhead abstraction - In server-side applications the performance of a promise implementation matters. Bluebird's server side performance is measured with highly relevant realistic end-to-end macro benchmarks and consistently comes out on top. We understand that if bluebird is as close to a zero cost abstraction as possible, developers won't be tempted to short-circuit and absorb complexity themselves.
  • Runs everywhere - Bluebird runs on pretty much every platform. This makes bluebird ideal for projects who care about providing consistent cross-platform and cross-version experience. It runs on old IE, it has even been known to run on Netscape 7.
  • Spec compatible - bluebird can work as a drop-in replacement for native promises for an instant performance boost. It passes the Promises/A+ test suite and is fully spec compliant.



    Related Projects

    co - The ultimate generator based flow-control goodness for nodejs (supports thunks, promises, etc)

    Generator based control flow goodness for nodejs and the browser, using promises, letting you write non-blocking code in a nice-ish has been released, which now relies on promises. It is a stepping stone towards the async/await proposal. The primary API change is how co() is invoked. Before, co returned a "thunk", which you then called with a callback and optional arguments. Now, co() returns a promise.

    Promises, Promises...

    A self-contained JavaScript implementation of the Promises/A+ specification (and Deferred provider), suitable for inclusion in larger libraries and projects.

    es6-promise - A polyfill for ES6-style Promises

    A lightweight library that provides tools for organizing asynchronous code

    promise-tests - DEPRECATED: use instead!

    DEPRECATED: use instead!

    js-promise-simple - Simple implementation of CommonJS Promises/A

    The simple implementation of CommonJS Promises/A.Using mocha from Node.js.

    promise-perf-tests - (No longer maintained) Basic performance tests for promise implementations

    This is a set of basic performance tests for promise implementations. As is almost always the case, take these with the usual grains of salt. That said, they should give a reasonable ballpark comparison of the performance characteristics of common, basic operations that most promise libraries provide.Of course, performance is not the only thing to consider in a promise library. Interoperability via a proposed standard, such as Promises/A, API convenience, safety, and even code size (for browser applications) are all important, application-specific considerations.