Closed yahacom closed 1 year ago
Example:
const old = { foo: [1, 2] }; const new = { foo: [3, 1, 2, 4, 0] }; const d = addedDiff(old, new); // Returns: {"foo": {"2": 2, "3": 4, "4": 0}}
Is it expected? No, from my perspective it should be like: {"foo": {"0": 3, "3": 4, "4": 0}}. Because current behaviour more answer question - what was changed in array instead of what was added to array.
{"foo": {"0": 3, "3": 4, "4": 0}}
Example:
Is it expected? No, from my perspective it should be like:
{"foo": {"0": 3, "3": 4, "4": 0}}
. Because current behaviour more answer question - what was changed in array instead of what was added to array.