mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-28 02:20:10 +00:00
started work on XOR(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
83e625c2bd
commit
670ed87d70
20
diff.js
20
diff.js
@ -599,6 +599,26 @@ object.Constructor('OR', Object.assign(Object.create(Pattern.prototype), {
|
||||
},
|
||||
}))
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// XXX XOR
|
||||
var XOR =
|
||||
module.XOR =
|
||||
object.Constructor('XOR', Object.assign(Object.create(Pattern.prototype), {
|
||||
__cmp__: function(obj, cmp, context){
|
||||
/* XXX
|
||||
for(var m of this.members){
|
||||
if(cmp(m, obj, context)){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
//*/
|
||||
},
|
||||
__init__: function(...members){
|
||||
this.members = members
|
||||
},
|
||||
}))
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Will compare as true if all of the .members compare as true...
|
||||
var AND =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user