UNPKG

ejson2

Version:
17 lines 743 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fromJSONValue = void 0; const index_1 = require("./index"); const utils_1 = require("../utils"); const adjust_types_from_json_value_1 = require("./adjust-types-from-json-value"); const from_json_value_helper_1 = require("./helpers/from-json-value-helper"); const fromJSONValue = item => { let changed = (0, from_json_value_helper_1.fromJSONValueHelper)(item); if (changed === item && (0, utils_1.isObject)(item)) { changed = index_1.EJSON.clone(item); (0, adjust_types_from_json_value_1.adjustTypesFromJSONValue)(changed); } return changed; }; exports.fromJSONValue = fromJSONValue; //# sourceMappingURL=from-json-value.js.map