mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-28 10:30:09 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e580ca99e7
commit
79ee039ed3
11
diff2.js
11
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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user