Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-06-19 11:39:42 +03:00
parent e580ca99e7
commit 79ee039ed3

View File

@ -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(