Closed pateketrueke closed 8 years ago
@pateketrueke because it isn't obvious what to do with arrays in this case, concat/replace or something else. There's no way to concat arrays now.
@unclechu resurrecting this one from the dead... it could be possible to create a factory pattern that accepted options for determining behavior. e.g.
const extend = deepExtend.set({ arrays: 'concat' });
const result = extend({}, {a:[3]}, {a:[1,2]});
// { a: [3, 1, 2] }
That could support multiple different methods (which could also be user-extendible), with the default being the current behavior of right-most replacement.
In your README you point out that extending
j: [1, 2]
withj: [3, 4]
will returnj: [3,4 ]
and I don't want that behavior... there is an option for concat arrays?