Blob
類別提供了許多方法,可用於以不同格式使用其內容,包括 .text()
。
const blob = new Blob(["hello world"]);
const str = await blob.text();
// => "hello world"
請參閱文件 > API > 二進位資料,以取得關於使用 Bun 操作二進位資料的完整文件。
Blob
類別提供了許多方法,可用於以不同格式使用其內容,包括 .text()
。
const blob = new Blob(["hello world"]);
const str = await blob.text();
// => "hello world"
請參閱文件 > API > 二進位資料,以取得關於使用 Bun 操作二進位資料的完整文件。
套件管理器
設定 git 以 diff Bun 的 lockb lockfile
在 GitHub Actions 中使用 Bun 安裝依賴項
讀取檔案
運行時
串流
將 ReadableStream 轉換為 Uint8Array
將 ReadableStream 轉換為 ArrayBuffer
將 Node.js Readable 轉換為 Uint8Array
工具程式