Clarify in docs this supports immutable-object pattern
bitofbreeze opened this issue ยท 1 comments
bitofbreeze commented
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
๐ Feature Proposal
It's not clear without testing that this doesn't modify the input.
Documenting this explicitly could boost adoption among people looking for a library compatible with immutable data structures. Maybe a description similar to https://immerjs.github.io/immer/#immer-simplifies-handling-immutable-data-structures
Motivation
No response
Example
const a = { a: 'value' }
const b = { b: 404 }
const result = deepMerge()(a, b);
console.log(result); // {a: 'value', b: 404 }
console.log(a); // {a: 'value'}
console.log(b); // {b: 404}
console.log(a === result); // false
console.log(b === result); // false
Uzlopak commented
If you like you can provide a PR.