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
實用程式