mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-29 02:50:10 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e4724708eb
commit
b77bfb03ee
13
diff.js
13
diff.js
@ -996,12 +996,19 @@ module.Types = {
|
|||||||
|
|
||||||
|
|
||||||
// XXX make this an extensible walker...
|
// XXX make this an extensible walker...
|
||||||
// ...ideally passed a func(A, B, obj, handle(action, value)) where:
|
// ...ideally passed a func(A, B, obj, ...) where:
|
||||||
// A - change.A
|
// A - change.A
|
||||||
// B - change.B
|
// B - change.B
|
||||||
// obj - object at change.path
|
// obj - object at change.path
|
||||||
// action - action to perform ('replace', 'return', ...)
|
// func(..) should be able to:
|
||||||
// value - action argument...
|
// - replace obj with B (patch)
|
||||||
|
// ...current implementation of .patch(..)
|
||||||
|
// - check obj against B (check)
|
||||||
|
// - swap A and B (reverse) ???
|
||||||
|
// - ...
|
||||||
|
// one way to do this is to pass func(..) a handler that it
|
||||||
|
// would call to control the outcome...
|
||||||
|
// ...still needs thought, but this feels right...
|
||||||
_walk: function(diff, obj, options){
|
_walk: function(diff, obj, options){
|
||||||
var that = this
|
var that = this
|
||||||
var NONE = diff.placeholders.NONE
|
var NONE = diff.placeholders.NONE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user