3 const _ = require("lodash");
5 module.exports = function() {
6 const mergeWithArgs = [{}];
7 Array.from(arguments).forEach(arg => mergeWithArgs.push(arg));
8 mergeWithArgs.push(mergeCustomizer);
10 return _.mergeWith.apply(_, mergeWithArgs);
13 function mergeCustomizer(objValue, srcValue) {
14 if (_.isArray(objValue, mergeCustomizer)) {
15 return objValue.concat(srcValue);