Skip to main content
Bun.readableStreamToText reads the contents of a ReadableStream into a string.
const stream = new ReadableStream();
const str = await Bun.readableStreamToText(stream);

See Bun’s other ReadableStream conversion functions.