Skip to main content
Bun.file() 函数接受一个路径并返回 BunFile 实例。BunFile 继承自 Blob,因此你可以以多种格式惰性读取文件。使用 .json() 读取并解析 .json 文件的内容为普通对象。 Bun 会相应地设置 BunFile 的 MIME 类型。
index.ts