Bun 提供了许多方便的函数,用于将 ReadableStream
的内容读取为不同的格式。
const stream = new ReadableStream();
const buf = await Bun.readableStreamToArrayBuffer(stream);
有关 Bun 其他 ReadableStream
转换函数的文档,请参阅 文档 > API > Utils。
Bun 提供了许多方便的函数,用于将 ReadableStream
的内容读取为不同的格式。
const stream = new ReadableStream();
const buf = await Bun.readableStreamToArrayBuffer(stream);
有关 Bun 其他 ReadableStream
转换函数的文档,请参阅 文档 > API > Utils。
HTTP
包管理器
将 bun install 与 Artifactory 一起使用
配置 Git 以 diff Bun 的 lockb lockfile
读取文件
运行时
流
将 ReadableStream 转换为 Uint8Array
将 ReadableStream 转换为 ArrayBuffer
将 Node.js Readable 转换为 Uint8Array
实用程序