mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-04-22 22:25:01 -04:00
initial commit
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var Promise = require('./core.js');
|
||||
|
||||
module.exports = Promise;
|
||||
Promise.prototype.done = function (onFulfilled, onRejected) {
|
||||
var self = arguments.length ? this.then.apply(this, arguments) : this;
|
||||
self.then(null, function (err) {
|
||||
setTimeout(function () {
|
||||
throw err;
|
||||
}, 0);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user