mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-28 10:30:09 +00:00
minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
469372fa6f
commit
cf67883981
3
diff.js
3
diff.js
@ -320,6 +320,7 @@ module.STRING =
|
||||
makeCIPattern('STRING',
|
||||
function(obj, cmp){
|
||||
return obj === STRING
|
||||
|| (typeof(obj) == typeof('str') && this.value == null)
|
||||
|| (typeof(obj) == typeof('str')
|
||||
&& (this.value instanceof RegExp ?
|
||||
this.value.test(obj)
|
||||
@ -349,6 +350,7 @@ module.NUMBER =
|
||||
makeCIPattern('NUMBER',
|
||||
function(obj, cmp){
|
||||
return obj === NUMBER
|
||||
|| (typeof(obj) == typeof(123) && this.value == null)
|
||||
|| (typeof(obj) == typeof(123)
|
||||
&& (this.value.length == 1
|
||||
&& typeof(this.value[0]) == typeof(123)?
|
||||
@ -625,7 +627,6 @@ object.makeConstructor('OF', Object.assign(new LogicType(), {
|
||||
// // if both of the array items are arrays it
|
||||
// // means that we are splicing array sections
|
||||
// // instead of array elements...
|
||||
// // XXX revise docs...
|
||||
// path: [<key>, ...],
|
||||
//
|
||||
// // values in A and B...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user