function deepClone(target){
let result;
if (typeof target === 'object') {
if (Array.isArray(target)) {
result = [];
for (let i in target) {
result.push(Utils.deepClone(target[i]));
}
} else if(target === null) {
result = null;
} else if(target.constructor === RegExp){
result = target;
}else {
result = {};
for (let i in target) {
result[i] = Utils.deepClone(target[i]);
}
}
} else {
result = target;
}
return result;
}
10-08
2838
10-18
139