MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / encodeBase64

Function encodeBase64

lib.commonjs/utils/base64.js:54–56  ·  view source on GitHub ↗

* Encodes %%data%% as a base-64 encoded string. * * @example: * // Encoding binary data as a hexstring * encodeBase64("0x1234") * //_result: * * // Encoding binary data as a Uint8Array * encodeBase64(new Uint8Array([ 0x12, 0x34 ])) * //_result: * * // The input MUST

(data)

Source from the content-addressed store, hash-verified

52 * //_result:
53 */
54function encodeBase64(data) {
55 return Buffer.from((0, data_js_1.getBytes)(data)).toString("base64");
56}
57exports.encodeBase64 = encodeBase64;
58//# sourceMappingURL=base64.js.map

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected