MCPcopy Create free account
hub / github.com/bytebase/bytebase / operatorDisplayLabel

Function operatorDisplayLabel

frontend/src/plugins/cel/types/operator.ts:92–100  ·  view source on GitHub ↗
(op: string)

Source from the content-addressed store, hash-verified

90// Returns a human-readable label for any operator form:
91// plain ("<="), CEL AST ("_<=_"), or prefixed ("@not_in").
92export 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
103const OperatorList: Record<Factor, Operator[]> = {

Callers 2

OperatorSelectFunction · 0.90
LevelBadgeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected