[feat] added and, or, not
This commit is contained in:
@@ -460,6 +460,15 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
case 'less_equal':{
|
case 'less_equal':{
|
||||||
return (Number(arra[1]) <= Number(arra[2])) ? '1' : '0'
|
return (Number(arra[1]) <= Number(arra[2])) ? '1' : '0'
|
||||||
}
|
}
|
||||||
|
case 'and':{
|
||||||
|
return (Number(arra[1]) && Number(arra[2])) ? '1' : '0'
|
||||||
|
}
|
||||||
|
case 'or':{
|
||||||
|
return (Number(arra[1]) || Number(arra[2])) ? '1' : '0'
|
||||||
|
}
|
||||||
|
case 'not':{
|
||||||
|
return (Number(arra[1]) === 0) ? '1' : '0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(p1.startsWith('random')){
|
if(p1.startsWith('random')){
|
||||||
|
|||||||
Reference in New Issue
Block a user