@ztimson/utils 0.26.13 → 0.26.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2051,9 +2051,9 @@ ${opts.message || this.desc}`;
|
|
|
2051
2051
|
return a == b;
|
|
2052
2052
|
case "!=":
|
|
2053
2053
|
return a != b;
|
|
2054
|
-
case "
|
|
2054
|
+
case "+=":
|
|
2055
2055
|
return a == null ? void 0 : a.toString().includes(b);
|
|
2056
|
-
case "
|
|
2056
|
+
case "-=":
|
|
2057
2057
|
return !(a == null ? void 0 : a.toString().includes(b));
|
|
2058
2058
|
case ">":
|
|
2059
2059
|
return a > b;
|
|
@@ -2071,7 +2071,7 @@ ${opts.message || this.desc}`;
|
|
|
2071
2071
|
return -1 != or.findIndex((p) => {
|
|
2072
2072
|
const and = p.split("&&").map((p2) => p2.trim()).filter((p2) => !!p2);
|
|
2073
2073
|
return and.filter((p2) => {
|
|
2074
|
-
const prop = /(\S+)\s*(
|
|
2074
|
+
const prop = /(\S+)\s*(==?|!=|\+=|-=|>=|>|<=|<)\s*(\S+)/g.exec(p2);
|
|
2075
2075
|
if (prop) {
|
|
2076
2076
|
const key = Object.keys(target).find((k) => k.toLowerCase() == prop[1].toLowerCase());
|
|
2077
2077
|
return evalBoolean(dotNotation(target, key || prop[1]), prop[2], JSONAttemptParse(prop[3]));
|