function deepClone(obj) {
if(!obj || typeof obj != 'object') return obj
if(obj instanceof RegExp) return new RegExp(obj)
var cloneObj = new obj.constructor
for(let key in obj) {
if (obj.hasOwnProperty(key)) {
cloneObj[key] = deepClone(obj[key])
}
}
return cloneObj
}