| Server IP : 185.208.173.17 / Your IP : 87.236.161.98 Web Server : Microsoft-IIS/10.0 System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64 User : IUSR ( 0) PHP Version : 7.4.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/memfs/lib/snapshot/ |
Upload File : |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromJsonSnapshot = exports.toJsonSnapshot = exports.fromJsonSnapshotSync = exports.toJsonSnapshotSync = void 0;
const JsonEncoder_1 = require("@jsonjoy.com/json-pack/lib/json/JsonEncoder");
const JsonDecoder_1 = require("@jsonjoy.com/json-pack/lib/json/JsonDecoder");
const sync_1 = require("./sync");
const async_1 = require("./async");
const shared_1 = require("./shared");
const encoder = new JsonEncoder_1.JsonEncoder(shared_1.writer);
const decoder = new JsonDecoder_1.JsonDecoder();
const toJsonSnapshotSync = (options) => {
const snapshot = (0, sync_1.toSnapshotSync)(options);
return encoder.encode(snapshot);
};
exports.toJsonSnapshotSync = toJsonSnapshotSync;
const fromJsonSnapshotSync = (uint8, options) => {
const snapshot = decoder.read(uint8);
(0, sync_1.fromSnapshotSync)(snapshot, options);
};
exports.fromJsonSnapshotSync = fromJsonSnapshotSync;
const toJsonSnapshot = async (options) => {
const snapshot = await (0, async_1.toSnapshot)(options);
return encoder.encode(snapshot);
};
exports.toJsonSnapshot = toJsonSnapshot;
const fromJsonSnapshot = async (uint8, options) => {
const snapshot = decoder.read(uint8);
await (0, async_1.fromSnapshot)(snapshot, options);
};
exports.fromJsonSnapshot = fromJsonSnapshot;
//# sourceMappingURL=json.js.map