MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / resolvePromise

Function resolvePromise

examples/io/streams/modules/streams.js:214–219  ·  view source on GitHub ↗
(record, value)

Source from the content-addressed store, hash-verified

212 return record.pending;
213}
214function resolvePromise(record, value) {
215 if (record.pending) {
216 record.pending = false;
217 record.resolve(value);
218 }
219}
220function rejectPromise(record, reason) {
221 if (record.pending) {
222 record.pending = false;

Callers 15

nextStepsFunction · 0.85
readMethod · 0.85
readMethod · 0.85
pipeStepFunction · 0.85
pullAlgorithmFunction · 0.85
cancel1AlgorithmFunction · 0.85
cancel2AlgorithmFunction · 0.85
ReadableStreamDefaultTeeFunction · 0.85
forwardReaderErrorFunction · 0.85
pullWithDefaultReaderFunction · 0.85
pullWithBYOBReaderFunction · 0.85
ReadableStreamCloseFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected