@ztimson/utils 0.26.7 → 0.26.8

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 CHANGED
@@ -2047,6 +2047,10 @@ ${opts.message || this.desc}`;
2047
2047
  return a == b;
2048
2048
  case "!=":
2049
2049
  return a != b;
2050
+ case "+":
2051
+ return a.includes(b);
2052
+ case "-":
2053
+ return !a.includes(b);
2050
2054
  case ">":
2051
2055
  return a > b;
2052
2056
  case ">=":
@@ -2063,7 +2067,7 @@ ${opts.message || this.desc}`;
2063
2067
  return -1 != or.findIndex((p) => {
2064
2068
  const and = p.split("&&").map((p2) => p2.trim()).filter((p2) => !!p2);
2065
2069
  return and.filter((p2) => {
2066
- const prop = /(\S+)\s*(==?|!=|>=|>|<=|<)\s*(\S+)/g.exec(p2);
2070
+ const prop = /(\S+)\s*(==?|!=|\+|-|>=|>|<=|<)\s*(\S+)/g.exec(p2);
2067
2071
  if (prop) {
2068
2072
  const key = Object.keys(target).find((k) => k.toLowerCase() == prop[1].toLowerCase());
2069
2073
  return evalBoolean(dotNotation(target, key || prop[1]), prop[2], JSONAttemptParse(prop[3]));