UNPKG

motion

Version:

motion - moving development forward

14 lines (12 loc) 324 B
'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 }) }) }