mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
15 lines
454 B
TypeScript
15 lines
454 B
TypeScript
export type SimpleOperators = "eq" | "ne" | "lt" | "lte" | "gt" | "gte";
|
|
import { OperatorSymbol } from "@qualifyze/airtable-formulator";
|
|
|
|
export const simpleOperatorMapping: Record<SimpleOperators, OperatorSymbol> = {
|
|
eq: "=",
|
|
ne: "!=",
|
|
lt: "<",
|
|
lte: "<=",
|
|
gt: ">",
|
|
gte: ">=",
|
|
} as const;
|
|
|
|
export const isSimpleOperator = (operator: any): operator is SimpleOperators =>
|
|
Object.keys(simpleOperatorMapping).includes(operator);
|