bluebird-ployfill
v1.0.1
Published
A polyfill for using bluebird as global Promise (when you don't like the original one.)
Downloads
3
Readme
bluebird-ployfill
Using bluebird to replace origin Promise in global.
Because origin Promise is so weak, bluebird have good performance, please refer [bluebird-benchmark]
NOTE: This lib is only for Node.js environment
Install
$ node install bluebird-ployfill
Usage & Example
Demo:
Promise has all methods of bluebird.
Code:
import 'bluebird-ployfill';
import { stat } from 'fs';
const statAsync = Promise.promisify(stat); // Using bluebird promise in global
statAsync('path')
.then(stats => {
// do something
}).catch(err => {
// do something
})