pipeTo

suspend fun <R : JsAny?> ReadableStream<R>.pipeTo(destination: WritableStream<R>, options: StreamPipeOptions)(source)
suspend fun <R : JsAny?> ReadableStream<R>.pipeTo(destination: WritableStream<R>)(source)

The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

MDN Reference