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

Function validateCppIdentifier

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

Source from the content-addressed store, hash-verified

130}
131
132function validateCppIdentifier(value: string, name: string): string {
133 if (!/^[A-Z_a-z]\w*$/.test(value))
134 throw new Error(
135 `${name} must be a valid C++ identifier (letters, digits, underscores, not starting with a digit): ${value}`
136 );
137 return value;
138}
139
140export function validateBasePath(value: string): string {
141 if (value === '') return value;

Callers 2

validateRcConfigFunction · 0.85
applyFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected