Execute a mutation function on the object and merge results.
The target object to be merged with mutation.
Options for mutation, ommit keys and additional data.
Internal tracking key for recursion.
The mutated and merged target object.
await mergeWithMutation({ a: { b: 1 } }, { mutation: () => ({ c: 2 }) });// => { a: { b: 1, c: 2 } } Copy
await mergeWithMutation({ a: { b: 1 } }, { mutation: () => ({ c: 2 }) });// => { a: { b: 1, c: 2 } }
Execute a mutation function on the object and merge results.