mirror of
https://github.com/knex/knex.git
synced 2025-07-10 02:20:51 +00:00
15 lines
505 B
JavaScript
15 lines
505 B
JavaScript
// TODO: replace with the bookshelf copy
|
|
var Promise = require('bluebird/js/main/promise')();
|
|
|
|
Promise.prototype.yield = Promise.prototype.thenReturn;
|
|
Promise.prototype.tap = function(handler) {
|
|
return this.then(handler).thenReturn(this);
|
|
};
|
|
Promise.prototype.ensure = Promise.prototype.lastly;
|
|
Promise.prototype.otherwise = Promise.prototype.caught;
|
|
Promise.prototype.exec = Promise.prototype.nodeify;
|
|
|
|
Promise.resolve = Promise.fulfilled;
|
|
Promise.reject = Promise.rejected;
|
|
|
|
module.exports = Promise; |