14 lines
324 B
JavaScript
Raw Normal View History

2022-07-07 18:23:44 +02:00
'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
})
})
}