MCPcopy Create free account
hub / github.com/BCsabaEngine/svelteesp32 / validateTriState

Function validateTriState

src/commandLine.ts:126–130  ·  view source on GitHub ↗
(value: string, name: string)

Source from the content-addressed store, hash-verified

124}
125
126function validateTriState(value: string, name: string): 'always' | 'never' | 'compiler' {
127 if (['always', 'never', 'compiler'].includes(value)) return value as 'always' | 'never' | 'compiler';
128
129 throw new Error(`Invalid ${name}: ${value}`);
130}
131
132function validateCppIdentifier(value: string, name: string): string {
133 if (!/^[A-Z_a-z]\w*$/.test(value))

Callers 2

validateRcConfigFunction · 0.85
applyFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected