bluebird-global
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/bluebird-global package

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i bluebird-global

Weekly Downloads

6,661

Version

1.0.1

License

MIT

Last publish

Collaborators

  • kaatt