Closed lddubeau closed 6 years ago
merge-options has some properties that we'd like to keep. For instance:
mergeOptions({ a: { b: 1 } }, { a: {} });
produces a result deep-equal to the first argument.
mergeOptions({ a: { b: 1 } }, { a: { b: undefined } });
produces a result deep-equal to the 2nd argument. A latter argument can undefine values in an earlier argument.
Unfortunately, lodash.merge
does not respect the 2nd characteristic. If we use it with the arguments in the 2nd example, it returns the first argument.
We've actually moved to compiling to es6. So it is not necessary to find a replacement.
merge-options is now pinned at 0.0.64. Newer versions ship as ES6 code, which fails on some platforms we still support. To use the newer versions we'd have to introduce a transpilation step to convert merge-options to ES5 code. We don't want that right now.
Evaluate, in order of decreasing likelihood:
Switching to a different package.
Rolling our own
Whether there would be a benefit to introducing ES6-to-ES5 transpilation in general.