function toText
toText(readableStream: ReadableStream): Promise<string>Converts a ReadableSteam of strings or Uint8Arrays
to a single string. Works the same as Response.text.
Examples
Example 1
Example 1
import { toText } from "@std/streams/to_text"; const stream = ReadableStream.from(["Hello, ", "world!"]); await toText(stream); // "Hello, world!"
Parameters
readableStream: ReadableStream