Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!isObject(source) || !isObject(other)) {
return other === undefined ? source : other;
}
if (isFunction(source) || isFunction(other)) {
return other === undefined ? source : other;
} // 合并两个对象的 key,另外要区分数组的初始值为 []
var keys = _Object$keys(_objectSpread({}, source, {}, other));
return _reduceInstanceProperty(keys).call(keys, function (acc, key) {
// 递归合并 value
acc[key] = merge(source[key], other[key]);
return acc;
}, _Array$isArray(source) ? [] : {});
};
/**