@gensx/storage
Version:
Cloud storage, blobs, sqlite, and vector database providers/hooks for GenSX.
29 lines (25 loc) • 741 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");
}
exports.fromBase64UrlSafe = fromBase64UrlSafe;
exports.toBase64UrlSafe = toBase64UrlSafe;
//# sourceMappingURL=base64.cjs.map