* @desc Returns a clone * @param {Object} obj - Object to clone * @returns {Object|Array} Cloned object
(obj)
| 92 | * @returns {Object|Array} Cloned object |
| 93 | */ |
| 94 | clone(obj) { |
| 95 | if (obj === null || typeof obj !== 'object' || obj.hasOwnProperty('isActiveClone')) return obj; |
| 96 | |
| 97 | const temp = obj.constructor(); // changed |
| 98 | |
| 99 | for (let key in obj) { |
| 100 | if (Object.prototype.hasOwnProperty.call(obj, key)) { |
| 101 | obj.isActiveClone = null; |
| 102 | temp[key] = utils.clone(obj[key]); |
| 103 | delete obj.isActiveClone; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | return temp; |
| 108 | }, |
| 109 | |
| 110 | /** |
| 111 | * @desc Checks if is an array or Array-like object |
nothing calls this directly
no test coverage detected
searching dependent graphs…