UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

21 lines 643 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compact = compact; exports.uncompact = uncompact; const json_1 = require("../../../util/json"); const lz_string_1 = require("lz-string"); /** * Compacts an object into a UTF-16 compressed string. * @see {@link uncompact} */ function compact(obj) { return (0, lz_string_1.compressToUTF16)(JSON.stringify(obj, json_1.jsonReplacer)); } /** * Uncompacts a UTF-16 compressed string into an object. * @see {@link compact} */ function uncompact(buf) { return JSON.parse((0, lz_string_1.decompressFromUTF16)(buf)); } //# sourceMappingURL=compact.js.map