diff --git a/src/utils/index.js b/src/utils/index.js index 0eed0fc..f070603 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -149,16 +149,11 @@ function processREGEX(operation, input, values) { } return false; case OperationsType.NOT_EXIST: - for (var i = 0; i < values.length; i++) { - if (input.match(values[i])) { - return false; - } - } - return true; + return !processREGEX(OperationsType.EXIST, input, values); case OperationsType.EQUAL: return input.match(`\\b${values[0]}\\b`) != null; case OperationsType.NOT_EQUAL: - return input.match(`\\b${values[0]}\\b`) == null; + return !processREGEX(OperationsType.EQUAL, input, values); } }