From d4c4a3554aa0359f0c783f4d289dc24b73f72c70 Mon Sep 17 00:00:00 2001 From: Corey Jansen Date: Thu, 15 Sep 2022 11:03:56 -0500 Subject: [PATCH 1/2] Add Not Contains Condition Inverse to contains operator --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 950defe..999127a 100644 --- a/index.js +++ b/index.js @@ -83,6 +83,9 @@ function checkConditions(settings, reference) { case "contains": result = toString(value).includes(targetValue); break; + case "not_contains": + result = !toString(value).includes(targetValue); + break; case "present": result = !!value; break; From f8fc7909bcf00b47c2c7dbe6b406049222fd975a Mon Sep 17 00:00:00 2001 From: Corey Jansen Date: Thu, 15 Sep 2022 11:04:51 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1455442..94af0a0 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ be converted to booleans. | startsWith | \_.toString(x).startsWith() | | | endsWith | \_.toString(x).endsWith() | | | contains | \_.toString(x).includes() | | +| not_contains | !\_.toString(x).includes() | | # Array Syntax