JS深拷贝进阶版支持特殊对象类型Map、Set
function deepClone(target: any, map new WeakMap()) {// 1. 基础类型直接返回if (target null || typeof target ! object) {return target;}// 2. 处理循环引用if (map.has(target)) {return map.get(target);}// 3. 处理特殊对象const type Object.prototype.toString.c…
2026/7/1 6:46:11