Skip to content

cdaringe/bluebirdify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Sets the global Promise in your JS env to use Bluebird

Resources

Stars

Watchers

Forks

Packages

No packages published