bluebird-ployfill
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

bluebird-ployfill

npm-v-badge npm-dt-badge travis-ci-master-badge coverge-master-badge

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.

bluebird-ployfill demo

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
    })

Readme

Keywords

none

Package Sidebar

Install

npm i bluebird-ployfill

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tonypythoneer