15 lines
414 B
JavaScript
15 lines
414 B
JavaScript
|
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
||
|
|
||
|
function merge(target, source) {
|
||
|
Object.keys(source).forEach(function (key) {
|
||
|
if (source[key] instanceof Object) {
|
||
|
if (target[key]) {
|
||
|
Object.assign(source[key], merge(target[key], source[key]));
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
return _objectSpread2(_objectSpread2({}, target), source);
|
||
|
}
|
||
|
|
||
|
export default merge;
|