Server IP : 162.213.251.212 / Your IP : 3.15.3.102 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/allssztx/./www/easybuyer/node_modules/es5-ext/object/ |
Upload File : |
"use strict"; var forEach = require("./for-each") , isPlainObject = require("./is-plain-object") , ensureValue = require("./valid-value") , isArray = Array.isArray; var copyValue = function (value, ancestors, ancestorsCopy) { var mode; if (isPlainObject(value)) mode = "object"; else if (isArray(value)) mode = "array"; if (!mode) return value; var copy = ancestorsCopy[ancestors.indexOf(value)]; if (copy) return copy; copy = mode === "object" ? {} : []; ancestors.push(value); ancestorsCopy.push(copy); if (mode === "object") { forEach(value, function (item, key) { copy[key] = copyValue(item, ancestors, ancestorsCopy); }); } else { value.forEach(function (item, index) { copy[index] = copyValue(item, ancestors, ancestorsCopy); }); } ancestors.pop(); ancestorsCopy.pop(); return copy; }; module.exports = function (source) { return copyValue(ensureValue(source), [], []); };