@samepage/internal
Version:
Utilities used across modules - not meant for use by users directly
11 lines • 393 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const binaryToBase64 = (state) => {
return typeof window === "undefined"
? Buffer.from(state).toString("base64")
: window.btoa(Array.from(state)
.map((s) => String.fromCharCode(s))
.join(""));
};
exports.default = binaryToBase64;
//# sourceMappingURL=binaryToBase64.js.map