mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-29 02:50:10 +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_NAME =
|
||||||
var FORMAT_VERSION = '0.0.0'
|
module.FORMAT_NAME = 'object-diff'
|
||||||
|
|
||||||
|
var FORMAT_VERSION =
|
||||||
|
module.FORMAT_VERSION = '0.0.0'
|
||||||
|
|
||||||
var MIN_TEXT_LENGTH = 100
|
var MIN_TEXT_LENGTH = 100
|
||||||
|
|
||||||
@ -2226,9 +2228,9 @@ var DiffClassPrototype = {
|
|||||||
var DiffPrototype = {
|
var DiffPrototype = {
|
||||||
// system meta information...
|
// system meta information...
|
||||||
get format(){
|
get format(){
|
||||||
return this.constructor.format },
|
return this.constructor.types.format },
|
||||||
get version(){
|
get version(){
|
||||||
return this.constructor.version },
|
return this.constructor.types.version },
|
||||||
|
|
||||||
// XXX is this the right thing to do???
|
// XXX is this the right thing to do???
|
||||||
// ...the bad thing here is that this can be mutated from the
|
// ...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(
|
module.DIFF_OBJECT = AND(
|
||||||
AT('format', diff.FORMAT_NAME),
|
AT('format', diff.FORMAT_NAME),
|
||||||
//AT('version', STRING(/\d+\.\d+\.\d+/)),
|
//AT('version', STRING(/\d+\.\d+\.\d+/)),
|
||||||
AT('placeholders', AND(
|
AT('version', diff.FORMAT_VERSION),
|
||||||
// XXX must be unique ANY...
|
|
||||||
AT('NONE', ANY),
|
|
||||||
AT('EMPTY', ANY))),
|
|
||||||
AT('options', AND(
|
AT('options', AND(
|
||||||
AT('tree_diff', OR(BOOL, null)),
|
AT('tree_diff', OR(BOOL, null)),
|
||||||
AT('keep_none', OR(BOOL, null)),
|
AT('keep_none', OR(BOOL, null)),
|
||||||
@ -75,6 +73,11 @@ module.DIFF_OBJECT = AND(
|
|||||||
AT('EMPTY', OR(ANY, null)),
|
AT('EMPTY', OR(ANY, null)),
|
||||||
AT('no_length', OR(BOOL, null)),
|
AT('no_length', OR(BOOL, null)),
|
||||||
AT('cmp', OR(FUNCTION, 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),
|
AT('timestamp', NUMBER),
|
||||||
OR(
|
OR(
|
||||||
AND(
|
AND(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user