readAllBytes
readAllBytes(
stream):Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/synapse-core/src/utils/streams.ts:125
Read a byte stream to the end and concatenate its chunks.
Rejects with the stream’s own error if it errors. new Response(stream).arrayBuffer() is not a
substitute: browsers replace the stream’s error with a generic TypeError.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
stream |
ReadableStream<Uint8Array<ArrayBufferLike>> |
The stream to read |
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
All bytes from the stream