Utilities for working with the Streams API.
Includes buffering and conversion.
import { toText } from "@std/streams";import { assertEquals } from "@std/assert";const stream = ReadableStream.from(["Hello, world!"]);const text = await toText(stream);assertEquals(text, "Hello, world!"); Copy
import { toText } from "@std/streams";import { assertEquals } from "@std/assert";const stream = ReadableStream.from(["Hello, world!"]);const text = await toText(stream);assertEquals(text, "Hello, world!");
Utilities for working with the Streams API.
Includes buffering and conversion.