(op: string)
| 90 | // Returns a human-readable label for any operator form: |
| 91 | // plain ("<="), CEL AST ("_<=_"), or prefixed ("@not_in"). |
| 92 | export function operatorDisplayLabel(op: string): string { |
| 93 | if (op in OPERATOR_DISPLAY) return OPERATOR_DISPLAY[op]; |
| 94 | // CEL AST operators like "_<=_" — strip surrounding underscores. |
| 95 | if (op.startsWith("_")) { |
| 96 | const plain = op.replace(/^_|_$/g, ""); |
| 97 | return OPERATOR_DISPLAY[plain] ?? plain; |
| 98 | } |
| 99 | return op; |
| 100 | } |
| 101 | |
| 102 | /// Define supported operators for each factor |
| 103 | const OperatorList: Record<Factor, Operator[]> = { |
no outgoing calls
no test coverage detected