atob 和 btoa 函数,用于编码和解码 base64 字符串。
请参阅 文档 > Web APIs 了解 Bun 中实现的 Web APIs 的完整说明。
atob 和 btoa 函数,用于编码和解码 base64 字符串。
const data = "hello world";
const encoded = btoa(data); // => "aGVsbG8gd29ybGQ="
const decoded = atob(encoded); // => "hello world"