feat: contains condition op
This commit is contained in:
parent
121f783d7e
commit
571b498658
|
@ -65,6 +65,14 @@ export class Condition {
|
|||
}
|
||||
return true;
|
||||
|
||||
case 'contains':
|
||||
if (this.operands.length < 2) {
|
||||
return false;
|
||||
}
|
||||
const haystack = this.operands[0].get(context);
|
||||
const needle = this.operands[1].get(context);
|
||||
return -1 !== haystack.indexOf(needle);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user