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
[Feature] Diff apply only added/updated? #522
Labels
Comments
I think this is a good idea but in the spirit of Just maybe should be a separate util. Something like just-diff-new |
I think that makes sense to make keep them separate rather than have a configuration option as you suggested. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a scenario where sometimes I want object diff to be considered as the whole object, and sometimes just as a partial object. When applying a partial object, if an existing key isn't provided I want it to just leave it as is. A deep merge option built in could be nice and is I believe can be done very simply.
The way I'm handling this now is after doing a diff, I'm looping through the changes and removing any remove operation:
For big objects, performance could benefit from this being built in where either diff optionally doesnt include remove operations or when doing diffApply it optionally skips the removals.
Looking through the documentation, I don't believe this is currently possible.
The text was updated successfully, but these errors were encountered: