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

24
node_modules/vant/es/utils/deep-assign.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
import { isDef, isObject } from '.';
var hasOwnProperty = Object.prototype.hasOwnProperty;
function assignKey(to, from, key) {
var val = from[key];
if (!isDef(val)) {
return;
}
if (!hasOwnProperty.call(to, key) || !isObject(val)) {
to[key] = val;
} else {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
to[key] = deepAssign(Object(to[key]), from[key]);
}
}
export function deepAssign(to, from) {
Object.keys(from).forEach(function (key) {
assignKey(to, from, key);
});
return to;
}