From 79ee039ed38c6acbf237421f1714a0e9fe29718e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 19 Jun 2021 11:39:42 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- diff2.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/diff2.js b/diff2.js index 4865d7a..59c17df 100644 --- a/diff2.js +++ b/diff2.js @@ -703,6 +703,9 @@ function(A, B, cmp){ // ] // // NOTE: this is generic -- does not care what it compares... +// +// XXX would be nice to be able to mixin stuff cmp -- to wrap container +// type and the like... var diffSections = module.diffSections = function(A, B, cmp){ @@ -731,8 +734,12 @@ function(A, B, cmp){ // insert an item into an array, this effectively changes all other // items (shifting their indexes by the number of items inserted)... // ...need to treat this gracefully... -// ......ignore array index??? -// ...to do this we need to know object type per element compared... +// we can: +// - ignore array index??? +// ...to do this we need to know object type per element +// compared... +// - handle item shifts gracefully... +// - diff recursively instead of flat... var diff = function(A, B){ return diffSections(