Bun 提供了许多便捷函数,用于将 ReadableStream 的内容读取为不同格式。
ts
const stream = new ReadableStream();
const str = await Bun.readableStreamToText(stream);请参阅 文档 > API > 工具函数 获取 Bun 其他 ReadableStream 转换函数的文档。