multi-account-post-schedule.../node_modules/promise/lib/done.js
2022-07-07 18:23:44 +02:00

14 lines
324 B
JavaScript

'use strict';
var Promise = require('./core.js')
var asap = require('asap')
module.exports = Promise
Promise.prototype.done = function (onFulfilled, onRejected) {
var self = arguments.length ? this.then.apply(this, arguments) : this
self.then(null, function (err) {
asap(function () {
throw err
})
})
}