Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
9
export
const
ensureValidClassName = (name: string) => {
10
if
(!isValidIdentifier(name)) {
11
return
`$${name.replace(/[^_$a-zA-Z0-9]/g,
''
)}`;
12
}
13
return
name;
14
};
Callers
4
parse
Method · 0.90
plugin
Function · 0.90
plugin
Function · 0.90
plugin
Function · 0.90
Calls
2
isValidIdentifier
Function · 0.85
replace
Method · 0.80
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…