-
-
Notifications
You must be signed in to change notification settings - Fork 96
Using for arrays? deleted seems to be wrong #43
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
Comments
You are right. Even the documentation example can't distinguish deletes on the same property. This behavior is actually quiet reasonable. How would you distinguish between an update and a delete? Maybe this is even the desired behavior in some cases (queue data structure).
|
got the same problem. is it a bug, right ? |
I think this is and should continue to be the intended behaviour. Reasoning, following @giorgio79's example: The operation to get from
to
is to shift everything else up 1 index to cover over the That matches what the diff you see is telling you:
If it said this,
that would imply the array should be transformed to
which is a different array! |
anko is correct, this is intended behavior. |
Tried using it for arrays, but it seems deleted items are tackled incorrectly. The script is not taking the shortest path.
eg https://runkit.com/giorgio79/5bead0643e02a00012ed51d0
getting
I would have expected
Object
added: Object {}
deleted: Object {1: ","}
updated: Object {}
The text was updated successfully, but these errors were encountered: