1.0.1 • Published 7 years ago

bluebird-global v1.0.1

Weekly downloads
4,861
License
MIT
Repository
github
Last release
7 years ago

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