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

Function isValidIdentifier

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

Source from the content-addressed store, hash-verified

1export const isValidIdentifier = (name: string) => {
2 return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(name);
3};
4
5export const isValidComponentName = (name: string) => {
6 return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF.]*$/.test(name);

Callers 5

generateAttrsFunction · 0.90
pluginFunction · 0.90
buildPackageImportFunction · 0.90
validate.test.tsFile · 0.90
ensureValidClassNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…