@stephen-shopopop/node-metrics
    Preparing search index...

    Function writeFromReadableStream

    • Pipes data from a web-standard ReadableStream<Uint8Array> to a Node.js Writable stream.

      This function reads chunks from the provided ReadableStream and writes them to the given Node.js Writable stream, handling backpressure and stream cancellation. If the writable stream is destroyed or encounters an error, the readable stream is cancelled. Likewise, if the readable stream ends, the writable stream is ended.

      Parameters

      • stream: ReadableStream<Uint8Array<ArrayBufferLike>>

        The web-standard readable stream to read data from.

      • writable: Writable

        The Node.js writable stream to write data to.

      Returns undefined | Promise<void>

      A promise that resolves when the readable stream is closed and all cleanup is complete.

      If the readable stream is already locked.