bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-08-05 18:40:18 +03:00
parent aa93295866
commit 0d3e7a602d

View File

@ -312,6 +312,7 @@ module.ANY =
// STRING(string) // STRING(string)
// STRING(regexp) // STRING(regexp)
// STRING(func) // STRING(func)
// STRING(pattern)
// -> pattern // -> pattern
// //
var STRING = var STRING =
@ -340,9 +341,9 @@ module.STRING =
// NUMBER(min, max) // NUMBER(min, max)
// NUMBER(min, max, step) // NUMBER(min, max, step)
// NUMBER(func) // NUMBER(func)
// NUMBER(pattern)
// -> pattern // -> pattern
// //
// XXX TEST...
var NUMBER = var NUMBER =
module.NUMBER = module.NUMBER =
makeCIPattern('NUMBER', makeCIPattern('NUMBER',
@ -360,7 +361,7 @@ module.NUMBER =
: this.value.length == 3 ? : this.value.length == 3 ?
this.value[0] <= obj this.value[0] <= obj
&& this.value[1] > obj && this.value[1] > obj
&& (obj + (this.value[0] % this.value[2])) % this.value[2] && (obj + (this.value[0] % this.value[2])) % this.value[2] == 0
: this.value[0] instanceof Function ? : this.value[0] instanceof Function ?
this.value[0](obj) this.value[0](obj)
// pattern... // pattern...