knex/lib/promise.js
Tim Griesser 3c8d08a64b Removing unnecessary UMD
When this eventually enabled on the client side,
we can build this into the build script.
2013-11-27 16:51:01 -05:00

21 lines
459 B
JavaScript

var Promise = require('bluebird/js/main/promise')();
Promise.prototype.yield = function(value) {
return this.then(function() {
return value;
});
};
Promise.prototype.tap = function(handler) {
return this.then(handler).yield(this);
};
Promise.prototype.ensure = Promise.prototype.lastly;
Promise.prototype.otherwise = Promise.prototype.caught;
Promise.resolve = Promise.fulfilled;
Promise.reject = Promise.rejected;
exports.Promise = Promise;