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

Method pipeThrough

out/cli.cjs:13989–14005  ·  view source on GitHub ↗
(rawTransform, rawOptions = {})

Source from the content-addressed store, hash-verified

13987 return AcquireReadableStreamBYOBReader(this);
13988 }
13989 pipeThrough(rawTransform, rawOptions = {}) {
13990 if (!IsReadableStream(this)) {
13991 throw streamBrandCheckException$1("pipeThrough");
13992 }
13993 assertRequiredArgument(rawTransform, 1, "pipeThrough");
13994 const transform = convertReadableWritablePair(rawTransform, "First parameter");
13995 const options = convertPipeOptions(rawOptions, "Second parameter");
13996 if (IsReadableStreamLocked(this)) {
13997 throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");
13998 }
13999 if (IsWritableStreamLocked(transform.writable)) {
14000 throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");
14001 }
14002 const promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
14003 setPromiseIsHandledToTrue(promise);
14004 return transform.readable;
14005 }
14006 pipeTo(destination, rawOptions = {}) {
14007 if (!IsReadableStream(this)) {
14008 return promiseRejectedWith(streamBrandCheckException$1("pipeTo"));

Callers

nothing calls this directly

Calls 9

IsReadableStreamFunction · 0.85
assertRequiredArgumentFunction · 0.85
convertPipeOptionsFunction · 0.85
IsReadableStreamLockedFunction · 0.85
IsWritableStreamLockedFunction · 0.85
ReadableStreamPipeToFunction · 0.85

Tested by

no test coverage detected