mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-29 11:00:12 +00:00
...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d88179a0b3
commit
f32a44ac1a
2
diff.js
2
diff.js
@ -62,7 +62,7 @@ var MIN_TEXT_LENGTH = 100
|
|||||||
// -> Set([key, ..])
|
// -> Set([key, ..])
|
||||||
//
|
//
|
||||||
// This is different to Object.keys(..) in that it gets both enumerable
|
// This is different to Object.keys(..) in that it gets both enumerable
|
||||||
// and non-enumerable keys as well as keys defined in prototypes...
|
// and non-enumerable keys in the whole prototype chain...
|
||||||
var getAllKeys = function(obj){
|
var getAllKeys = function(obj){
|
||||||
var res = new Set()
|
var res = new Set()
|
||||||
while(obj.__proto__ || obj === obj.__proto__){
|
while(obj.__proto__ || obj === obj.__proto__){
|
||||||
|
|||||||
@ -96,7 +96,7 @@ module.OBJECT_CHANGE = AND(
|
|||||||
AT('type', 'Object'),
|
AT('type', 'Object'),
|
||||||
AT('items', L(OBJECT_ITEM)),
|
AT('items', L(OBJECT_ITEM)),
|
||||||
// XXX
|
// XXX
|
||||||
AT('item_order', undefined))
|
OPT('item_order'))
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@ -108,15 +108,13 @@ module.ARRAY_ITEM = OR(
|
|||||||
|
|
||||||
var ARRAY_ITEMS =
|
var ARRAY_ITEMS =
|
||||||
module.ARRAY_ITEMS = AND(
|
module.ARRAY_ITEMS = AND(
|
||||||
AT('length', OR(
|
|
||||||
[N, N],
|
|
||||||
undefined)),
|
|
||||||
AT('items',
|
AT('items',
|
||||||
L(OR(
|
L(OR(
|
||||||
ARRAY_ITEM,
|
ARRAY_ITEM,
|
||||||
OBJECT_ITEM))),
|
OBJECT_ITEM))),
|
||||||
|
OPT('length', [N, N]),
|
||||||
// XXX
|
// XXX
|
||||||
AT('item_order', undefined))
|
OPT('item_order'))
|
||||||
|
|
||||||
var ARRAY_CHANGE =
|
var ARRAY_CHANGE =
|
||||||
module.ARRAY_CHANGE = AND(
|
module.ARRAY_CHANGE = AND(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user