Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bluebird-global

kaatt94.8kMIT1.0.1TypeScript support: definitely-typed

Patches global.Promise to use bluebird and returns a bluebird instance

polyfill, promise-library, promise, performance, promises, promises-a, promises-aplus, async, await

readme

bluebird-global

Micromodule. Patches global.Promise to use the bluebird library which has better than native performance for Promises.

Simply install any version of bluebird that you wish the library to use (bluebird is a peer dependency) and call:

import bluebird from 'bluebird-global'

or

const bluebird = require('bluebird-global')

All extra functions that bluebird provides but isn't defined in the ES spec should called like bluebird.map instead of like Promise.map so that TypeScript and Flow don't complain.

You can simply call import 'bluebird-global' or require('bluebird-global') if you won't use any bluebird-specific functions.

License

MIT © kaatt