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.