@exodus/fusion-merge
v2.0.1
Published
The fusion-merge library
Downloads
12,390
Readme
@exodus/fusion-merge
Custom merge algorithm for fusion.
This doesn't create a clone for mismatching entries, it reuses existing ones where possible. Unlike merge-deep, e.g. arrays are not merged, this replaces arrays.
This works only on JSON-compatible plain objects. Other objects will be replaced, not merged.
Empty object keys replace existing object keys:
merge({ foo: { bar: 0 } }, { foo: {} })
// => { foo: {} }