Files
discord-decomp/_bundle/allSettled_4431.js
T
2026-11-01 12:12:55 +02:00

38 lines
1.1 KiB
JavaScript

// Metro module 4431 (f4432).
import * as _requirePromise from "./requirePromise";
import * as _callBind from "./callBind";
import * as _GetIntrinsic from "./GetIntrinsic";
import * as _Type from "./Type";
import * as _iterateValue from "./iterateValue";
import * as _map from "./map";
import * as _PromiseResolve from "./PromiseResolve";
_requirePromise();
let c2656_2 = _callBind(_GetIntrinsic("%Promise.all%"));
let c2656_3 = _callBind(_GetIntrinsic("%Promise.reject%"));
module.exports = function allSettled(a0) {
const _this = this;
if (_Type(this) !== "Object") {
throw new TypeError("`this` value must be an object");
}
return c2656_2(this, _map(_iterateValue(a0), function(a0) {
let r13;
const r6 = _PromiseResolve(_this, a0);
try {
r13 = r6.then(function(result) {
return {
status: "fulfilled",
value: result
};
}, function(a0) {
return {
status: "rejected",
reason: a0
};
});
} catch ($e) {
return c2656_3(_this, $e);
}
return r13;
}));
};