Skip to main content
Bun.readableStreamToArray reads the contents of a ReadableStream into an array of chunks.
const stream = new ReadableStream();
const str = await Bun.readableStreamToArray(stream);

See Bun’s other ReadableStream conversion functions.