Better search include/excludes
Some checks failed
Build / Build NPM Project (push) Successful in 43s
Build / Publish Documentation (push) Failing after 4s
Build / Tag Version (push) Successful in 8s

This commit is contained in:
2025-07-21 18:46:27 -04:00
parent 2b12916246
commit c1577c2106
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@ztimson/utils",
"version": "0.26.11",
"version": "0.26.12",
"description": "Utility library",
"author": "Zak Timson",
"license": "MIT",

View File

@ -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;