Better search include/excludes
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.26.11",
|
||||
"version": "0.26.12",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
@ -39,8 +39,8 @@ export function logicTest(target: object, condition: string): boolean {
|
||||
case '=':
|
||||
case '==': return a == b;
|
||||
case '!=': return a != b;
|
||||
case '+': return typeof a?.includes != 'undefined' ? a.includes(b) : a == b;
|
||||
case '-': return typeof a?.includes != 'undefined' ? !a.includes(b) : a != b;
|
||||
case '+': return a.toString().includes(b);
|
||||
case '-': return !a.toString().includes(b);
|
||||
case '>': return a > b;
|
||||
case '>=': return a >= b;
|
||||
case '<': return a < b;
|
||||
|
Reference in New Issue
Block a user