Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

14 righe
314 B

  1. 'use strict';
  2. var Promise = require('./core.js');
  3. module.exports = Promise;
  4. Promise.prototype.done = function (onFulfilled, onRejected) {
  5. var self = arguments.length ? this.then.apply(this, arguments) : this;
  6. self.then(null, function (err) {
  7. setTimeout(function () {
  8. throw err;
  9. }, 0);
  10. });
  11. };