Open
Description
I am just trying this library for simple arrays and it's not working as I expected. This is the code:
const a1 = [2, 5, 8, 20];
const a2 = [5, 7, 9, 20];
const diff = detailedDiff(a1, a2);
// this is the result
// { added: {},
// deleted: {},
// updated: {0: 5, 1: 7, 2: 9} }
// I was expecting this result
// { added: {0: 7, 1: 9}
// deleted: {0: 2, 1: 8}
// updated: {}}
Can someone explain this result?
Metadata
Metadata
Assignees
Labels
No labels