MCPcopy Index your code
hub / github.com/caseywebdev/react-list / resolveThenable

Function resolveThenable

docs/index.js:162–193  ·  view source on GitHub ↗
(thenable)

Source from the content-addressed store, hash-verified

160}
161function noop$1() {}
162function resolveThenable(thenable) {
163 switch (thenable.status) {
164 case "fulfilled":
165 return thenable.value;
166 case "rejected":
167 throw thenable.reason;
168 default:
169 switch (
170 ("string" === typeof thenable.status
171 ? thenable.then(noop$1, noop$1)
172 : ((thenable.status = "pending"),
173 thenable.then(
174 function (fulfilledValue) {
175 "pending" === thenable.status &&
176 ((thenable.status = "fulfilled"),
177 (thenable.value = fulfilledValue));
178 },
179 function (error) {
180 "pending" === thenable.status &&
181 ((thenable.status = "rejected"), (thenable.reason = error));
182 }
183 )),
184 thenable.status)
185 ) {
186 case "fulfilled":
187 return thenable.value;
188 case "rejected":
189 throw thenable.reason;
190 }
191 }
192 throw thenable;
193}
194function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
195 var type = typeof children;
196 if ("undefined" === type || "boolean" === type) children = null;

Callers 1

mapIntoArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…