Skip to content
New issue

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

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

Already on GitHub? # to your account

Clarify in docs this supports immutable-object pattern #42

Closed
2 tasks done
bitofbreeze opened this issue Aug 10, 2024 · 1 comment · Fixed by #60
Closed
2 tasks done

Clarify in docs this supports immutable-object pattern #42

bitofbreeze opened this issue Aug 10, 2024 · 1 comment · Fixed by #60

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.

@Uzlopak Uzlopak linked a pull request Jan 8, 2025 that will close this issue
4 tasks
@Fdawgs Fdawgs closed this as completed in #60 Jan 8, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants