mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-29 19:10:11 +00:00
Merge branch 'master' of github.com:flynx/diff.js
This commit is contained in:
commit
2a25dc00e0
14
diff2.js
14
diff2.js
@ -94,6 +94,10 @@ module.HANDLERS = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// XXX do we need to treat array keys as a special case???
|
// XXX do we need to treat array keys as a special case???
|
||||||
|
// ...the best approach could be to simply:
|
||||||
|
// - prioretize handlers -- already done
|
||||||
|
// - skip repeating keys
|
||||||
|
// ...this could be done on the root handler level...
|
||||||
// XXX need to optionally handle props...
|
// XXX need to optionally handle props...
|
||||||
keys: {
|
keys: {
|
||||||
match: function(obj){
|
match: function(obj){
|
||||||
@ -133,6 +137,7 @@ function(obj, handlers=module.HANDLERS){
|
|||||||
|
|
||||||
// XXX need a way to index the path...
|
// XXX need a way to index the path...
|
||||||
// ...and to filter paths by pattern...
|
// ...and to filter paths by pattern...
|
||||||
|
// XXX need to generate object UIDs for use in paths etc...
|
||||||
var handle =
|
var handle =
|
||||||
module.handle =
|
module.handle =
|
||||||
function*(obj, path=[], options={}){
|
function*(obj, path=[], options={}){
|
||||||
@ -231,6 +236,15 @@ var o = {
|
|||||||
object: {
|
object: {
|
||||||
x: {},
|
x: {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
array_with_attrs: Object.assign(
|
||||||
|
// XXX should empty slots be marked in arrays???
|
||||||
|
[1, 2, 3, , 5, 6],
|
||||||
|
{
|
||||||
|
a: "some value",
|
||||||
|
// will overwrite 2...
|
||||||
|
1: 333,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// loop...
|
// loop...
|
||||||
o.object.y = o.object
|
o.object.y = o.object
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user