more fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-09-02 04:00:45 +03:00
parent c4263bef74
commit c2949d3d35
2 changed files with 13 additions and 8 deletions

10
diff.js
View File

@ -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

View File

@ -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(