Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify in docs this supports immutable-object pattern #42

Open
2 tasks done
bitofbreeze opened this issue Aug 10, 2024 · 1 comment
Open
2 tasks done

Clarify in docs this supports immutable-object pattern #42

bitofbreeze opened this issue Aug 10, 2024 · 1 comment

Comments

@bitofbreeze
Copy link

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
Copy link
Contributor

Uzlopak commented Aug 10, 2024

If you like you can provide a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants