mergeDeepWith()

LikemergeDeep(), but when two non-collections or incompatible collections are encountered at the same key, it uses the merger function to determine the resulting value. Collections are considered incompatible if they fall into separate categories between keyed, indexed, and set-like.

Method signature

mergeDeepWith(
  merger: (oldVal, newVal, key) => any,
  collection,
  ...collections
)

A functional alternative to collection.mergeDeepWith() which will also work with plain Objects and Arrays.

;