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