UNPKG

motoko

Version:

Compile and run Motoko smart contracts in Node.js or the browser.

10 lines 428 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.asciiToUtf8 = void 0; const textDecoder = new TextDecoder(); /// Convert an ASCII string from `js_of_ocaml` to a UTF-8 string. const asciiToUtf8 = (text) => { return textDecoder.decode(Uint8Array.from({ length: text.length }).map((_, i) => text.charCodeAt(i))); }; exports.asciiToUtf8 = asciiToUtf8; //# sourceMappingURL=asciiToUtf8.js.map