kaatt / bluebird-global

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

License:MIT License


Languages

Language:JavaScript 100.0%