MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / ensureValidClassName

Function ensureValidClassName

modules/code-generator/src/utils/validate.ts:9–14  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

7};
8
9export const ensureValidClassName = (name: string) => {
10 if (!isValidIdentifier(name)) {
11 return `$${name.replace(/[^_$a-zA-Z0-9]/g, '')}`;
12 }
13 return name;
14};

Callers 4

parseMethod · 0.90
pluginFunction · 0.90
pluginFunction · 0.90
pluginFunction · 0.90

Calls 2

isValidIdentifierFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…