bluebirdify

1.1.1 • Public • Published

Codeship Status for cdaringe/bluebirdify

bluebirdify

Sets Bluebird Promises as the global promises for your app.

Supports CommonJS (node), AMD, and browser-global via UMD!

usage

Basic case:

require('bluebirdify')(); // done! now, Promise === Bluebird

To handle uncaught exceptions:

require('bluebirdify')({
    onuncaught: function(err) { ... }  // or `chirp: true or function`
});

// or,
bluebirdify = require('bluebirdify');
bluebirdify();
bluebirdify.chirp(function(err) { ... }); // or
bluebirdify.handleUncaught(function(err) { ... });

You can even chirp()/handleUncaught() [same method] with no handler passed in to get the basic console logging onUnhandled rejection. The error is re-thrown after error content is logged.

Readme

Keywords

none

Package Sidebar

Install

npm i bluebirdify

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • cdaringe