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

Method cancel

examples/io/streams/modules/streams.js:278–283  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

276 return IsReadableStreamLocked(stream);
277 }
278 cancel(reason) {
279 const stream = ReadableStreamBrand.get(this);
280 if (IsReadableStreamLocked(stream))
281 return Promise.reject(new TypeError("stream locked"));
282 return ReadableStreamCancel(stream, reason);
283 }
284 getReader(options) {
285 const stream = ReadableStreamBrand.get(this);
286 if (!options || !("mode" in options) || (options.mode === undefined))

Callers 4

write.jsFile · 0.45
cancel.jsFile · 0.45
main.jsFile · 0.45
callbackMethod · 0.45

Calls 3

IsReadableStreamLockedFunction · 0.85
ReadableStreamCancelFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected