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

Function validate

frontend/src/plugins/cel/logic/validate.ts:79–84  ·  view source on GitHub ↗
(expr: SimpleExpr)

Source from the content-addressed store, hash-verified

77 return Boolean(rawString.content);
78 };
79 const validate = (expr: SimpleExpr): boolean => {
80 if (isConditionGroupExpr(expr)) return validateConditionGroup(expr);
81 if (isConditionExpr(expr)) return validateCondition(expr);
82 if (isRawStringExpr(expr)) return validateRawString(expr);
83 throw new Error(`unsupported expr '${JSON.stringify(expr)}'`);
84 };
85 return validate(expr);
86};

Callers 1

validateSimpleExprFunction · 0.70

Calls 6

isConditionGroupExprFunction · 0.90
isConditionExprFunction · 0.90
isRawStringExprFunction · 0.90
validateConditionGroupFunction · 0.85
validateConditionFunction · 0.85
validateRawStringFunction · 0.85

Tested by

no test coverage detected