parcoursup/node_modules/@ungap/promise-all-settled/cjs/index.js
lalBi94 7bc56c09b5 $
2023-03-05 13:23:23 +01:00

20 lines
457 B
JavaScript

var allSettled = Promise.allSettled || function ($) {'use strict';
var self = this;
return self.all(
$.map(
function (value) {
return self.resolve(value).then(this.$, this._);
},
{
$: function (value) {
return {status: 'fulfilled', value: value};
},
_: function (reason) {
return {status: 'rejected', reason: reason};
}
}
)
);
};
module.exports = allSettled;