MCPcopy Create free account
hub / github.com/react/create-react-app / settle

Function settle

packages/react-error-overlay/fixtures/bundle_u.mjs:20596–20613  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

20594 value: true
20595});
20596function settle(val) {
20597 if (!Array.isArray(val)) val = [val];
20598 return Promise.all(val.map(function (p) {
20599 return p.then(function (value) {
20600 return {
20601 isFulfilled: true,
20602 isRejected: false,
20603 value: value
20604 };
20605 }).catch(function (reason) {
20606 return {
20607 isFulfilled: false,
20608 isRejected: true,
20609 reason: reason
20610 };
20611 });
20612 }));
20613}
20614
20615exports.settle = settle;
20616exports.default = settle;

Callers 1

mapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected