MCPcopy
hub / github.com/Exrick/xpay / Q

Function Q

xpay-code/src/main/resources/static/swagger/swagger-ui.js:18635–18649  ·  view source on GitHub ↗

* Constructs a promise for an immediate reference, passes promises through, or * coerces promises from different systems. * @param value immediate reference or promise

(value)

Source from the content-addressed store, hash-verified

18633 * @param value immediate reference or promise
18634 */
18635function Q(value) {
18636 // If the object is already a Promise, return it directly. This enables
18637 // the resolve function to both be used to created references from objects,
18638 // but to tolerably coerce non-promises to promises.
18639 if (value instanceof Promise) {
18640 return value;
18641 }
18642
18643 // assimilate thenables
18644 if (isPromiseAlike(value)) {
18645 return coerce(value);
18646 } else {
18647 return fulfill(value);
18648 }
18649}
18650Q.resolve = Q;
18651
18652/**

Callers 11

deferFunction · 0.70
swagger-ui.jsFile · 0.70
raceFunction · 0.70
whenFunction · 0.70
masterFunction · 0.70
spreadFunction · 0.70
continuerFunction · 0.70
dispatchFunction · 0.70
allSettledFunction · 0.70
progressFunction · 0.70
nodeifyFunction · 0.70

Calls 3

isPromiseAlikeFunction · 0.85
coerceFunction · 0.85
fulfillFunction · 0.85

Tested by

no test coverage detected