mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-28 18:40:09 +00:00
more fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c4263bef74
commit
c2949d3d35
10
diff.js
10
diff.js
@ -13,9 +13,11 @@ var object = require('ig-object')
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
var FORMAT_NAME = 'object-diff'
|
||||
var FORMAT_VERSION = '0.0.0'
|
||||
var FORMAT_NAME =
|
||||
module.FORMAT_NAME = 'object-diff'
|
||||
|
||||
var FORMAT_VERSION =
|
||||
module.FORMAT_VERSION = '0.0.0'
|
||||
|
||||
var MIN_TEXT_LENGTH = 100
|
||||
|
||||
@ -2226,9 +2228,9 @@ var DiffClassPrototype = {
|
||||
var DiffPrototype = {
|
||||
// system meta information...
|
||||
get format(){
|
||||
return this.constructor.format },
|
||||
return this.constructor.types.format },
|
||||
get version(){
|
||||
return this.constructor.version },
|
||||
return this.constructor.types.version },
|
||||
|
||||
// XXX is this the right thing to do???
|
||||
// ...the bad thing here is that this can be mutated from the
|
||||
|
||||
11
format.js
11
format.js
@ -62,10 +62,8 @@ var DIFF_OBJECT =
|
||||
module.DIFF_OBJECT = AND(
|
||||
AT('format', diff.FORMAT_NAME),
|
||||
//AT('version', STRING(/\d+\.\d+\.\d+/)),
|
||||
AT('placeholders', AND(
|
||||
// XXX must be unique ANY...
|
||||
AT('NONE', ANY),
|
||||
AT('EMPTY', ANY))),
|
||||
AT('version', diff.FORMAT_VERSION),
|
||||
|
||||
AT('options', AND(
|
||||
AT('tree_diff', OR(BOOL, null)),
|
||||
AT('keep_none', OR(BOOL, null)),
|
||||
@ -75,6 +73,11 @@ module.DIFF_OBJECT = AND(
|
||||
AT('EMPTY', OR(ANY, null)),
|
||||
AT('no_length', OR(BOOL, null)),
|
||||
AT('cmp', OR(FUNCTION, null)) )),
|
||||
AT('placeholders', AND(
|
||||
// XXX would be nice to store these and to use them to test later...
|
||||
AT('NONE', ANY),
|
||||
AT('EMPTY', ANY))),
|
||||
|
||||
AT('timestamp', NUMBER),
|
||||
OR(
|
||||
AND(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user