MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / ReadableStreamCancel

Function ReadableStreamCancel

out/cli.cjs:14133–14152  ·  view source on GitHub ↗
(stream4, reason)

Source from the content-addressed store, hash-verified

14131 return true;
14132 }
14133 function ReadableStreamCancel(stream4, reason) {
14134 stream4._disturbed = true;
14135 if (stream4._state === "closed") {
14136 return promiseResolvedWith(void 0);
14137 }
14138 if (stream4._state === "errored") {
14139 return promiseRejectedWith(stream4._storedError);
14140 }
14141 ReadableStreamClose(stream4);
14142 const reader = stream4._reader;
14143 if (reader !== void 0 && IsReadableStreamBYOBReader(reader)) {
14144 const readIntoRequests = reader._readIntoRequests;
14145 reader._readIntoRequests = new SimpleQueue();
14146 readIntoRequests.forEach((readIntoRequest) => {
14147 readIntoRequest._closeSteps(void 0);
14148 });
14149 }
14150 const sourceCancelPromise = stream4._readableStreamController[CancelSteps](reason);
14151 return transformPromiseWith(sourceCancelPromise, noop2);
14152 }
14153 function ReadableStreamClose(stream4) {
14154 stream4._state = "closed";
14155 const reader = stream4._reader;

Callers 7

ReadableStreamPipeToFunction · 0.85
cancel1AlgorithmFunction · 0.85
cancel2AlgorithmFunction · 0.85
pullWithDefaultReaderFunction · 0.85
pullWithBYOBReaderFunction · 0.85
cancelMethod · 0.85

Calls 6

promiseResolvedWithFunction · 0.85
promiseRejectedWithFunction · 0.85
ReadableStreamCloseFunction · 0.85
transformPromiseWithFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…