fus-ext
Version:
FutureScript Extension
38 lines (36 loc) • 1.41 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.bound = exports.toHex = exports.toString = exports.toBase64 = undefined;
var _main = require("./main");
var dotDotCalc_573300145710716007 = function (dotDot, a, b, c) {
return dotDot(a)[b](a, ...c);
};var $base64, toBase64, toString, toHex, bound;$base64 = require("./base64");exports.toBase64 = toBase64 = function (bytes) {
return (() => {
return $base64.fromByteArray(bytes);
})();
};exports.toString = toString = function (bytes) {
return (() => {
return decodeURIComponent(Array.from(bytes).map(function (m) {
return (() => {
return "%" + dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, m, "format", [{ integerSize: 2, radix: 16 }]).toUpperCase();
})();
}).join(""));
})();
};exports.toHex = toHex = function (bytes) {
return (() => {
return Array.from(bytes).map(function (m) {
return (() => {
return dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, m, "format", [{ integerSize: 2, radix: 16 }]);
})();
}).join("");
})();
};exports.bound = bound = function (bytes) {
return (() => {
return bytes.length - 1;
})();
};exports.toBase64 = toBase64;
exports.toString = toString;
exports.toHex = toHex;
exports.bound = bound;