@gensx/storage
Version:
Cloud storage, blobs, sqlite, and vector database providers/hooks for GenSX.
26 lines (23 loc) • 682 B
JavaScript
/**
* Check out the docs at https://www.gensx.com/docs
* Find us on Github https://github.com/gensx-inc/gensx
* Find us on Discord https://discord.gg/F5BSU8Kc
*/
/**
* Convert string to URL-safe base64
* @param str The string to encode
* @returns URL-safe base64 encoded string
*/
function toBase64UrlSafe(str) {
return Buffer.from(str).toString("base64url");
}
/**
* Convert URL-safe base64 to string
* @param base64 The URL-safe base64 string to decode
* @returns Decoded string
*/
function fromBase64UrlSafe(base64) {
return Buffer.from(base64, "base64url").toString("utf-8");
}
export { fromBase64UrlSafe, toBase64UrlSafe };
//# sourceMappingURL=base64.js.map