"use strict"; function isArray(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } else { return Object.prototype.toString.call(value) === "[object Array]"; } } function isObject(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function cloneDeep(obj) { const d = isArray(obj) ? obj : {}; if (isObject(obj)) { for (const key in obj) { if (obj[key]) { if (obj[key] && typeof obj[key] === "object") { d[key] = cloneDeep(obj[key]); } else { d[key] = obj[key]; } } } } return d; } exports.cloneDeep = cloneDeep;