11 lines
196 B
JavaScript
11 lines
196 B
JavaScript
import mergeWith from 'lodash.mergewith';
|
|
|
|
export function merge(...args) {
|
|
args.push((l, r) => {
|
|
if (Array.isArray(l)) {
|
|
return r;
|
|
}
|
|
});
|
|
return mergeWith.apply(null, args);
|
|
}
|