Skip to main content
Bun 提供了若干便捷函数,可将 ReadableStream 的内容读取成不同格式。
const stream = new ReadableStream();
const buf = await Bun.readableStreamToArrayBuffer(stream);

有关 Bun 其他 ReadableStream 转换函数的文档,请参见 Docs > API > Utils