Simplifying result packaging

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Jordan Snow <ssnowj@gmail.com>
This commit is contained in:
Jordan Snow
2024-10-03 10:57:30 -04:00
committed by GitHub
parent cec8e8c94d
commit 3337936876
@@ -123,11 +123,8 @@ export function splitFilterExpression(
}
const key = match[2];
const parameters = match[3].split(',').filter(Boolean); // silently ignore double commas
if (match[1]) {
result.push({ key, parameters, negation: true });
} else {
result.push({ key, parameters, negation: false });
}
const negation = Boolean(match[1]);
result.push({ key, parameters, negation });
}
return result;