MCPcopy Create free account
hub / github.com/EsperoTech/yaade / isValidVariableName

Function isValidVariableName

server/src/main/resources/interpolate.js:43–57  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

41]);
42
43function isValidVariableName(value) {
44 if (reservedWords.has(value)) {
45 return false;
46 }
47
48 if (!/^[a-zA-Z_$]/.test(value)) {
49 return false;
50 }
51
52 if (!/^[a-zA-Z0-9_$]*$/.test(value)) {
53 return false;
54 }
55
56 return true;
57}
58
59function interpolate0(
60 template,

Callers 1

interpolate0Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected