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

Function createPromise

examples/io/streams/modules/streams.js:184–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182}
183
184function createPromise() {
185 const record = {
186 pending: true
187 };
188 record.promise = new Promise((resolve, reject) => {
189 record.resolve = resolve;
190 record.reject = reject;
191 });
192 return record;
193}
194function createRejectedPromise(reason) {
195 const record = {
196 pending: false

Callers 15

nextStepsFunction · 0.85
readMethod · 0.85
readMethod · 0.85
pipeStepFunction · 0.85
ReadableStreamDefaultTeeFunction · 0.85
ReadableByteStreamTeeFunction · 0.85
WritableStreamAbortFunction · 0.85
WritableStreamCloseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected