This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

28
node_modules/vant/lib/utils/deep-clone.js generated vendored Normal file
View File

@ -0,0 +1,28 @@
"use strict";
exports.__esModule = true;
exports.deepClone = deepClone;
var _index = require("./index");
function deepClone(obj) {
if (!(0, _index.isDef)(obj)) {
return obj;
}
if (Array.isArray(obj)) {
return obj.map(function (item) {
return deepClone(item);
});
}
if (typeof obj === 'object') {
var to = {};
Object.keys(obj).forEach(function (key) {
to[key] = deepClone(obj[key]);
});
return to;
}
return obj;
}