MCPcopy
hub / github.com/BrainJS/brain.js / isIdentifierStart

Function isIdentifierStart

browser.js:17788–17796  ·  view source on GitHub ↗
(code, astral)

Source from the content-addressed store, hash-verified

17786// Test whether a given character code starts an identifier.
17787
17788function isIdentifierStart(code, astral) {
17789 if (code < 65) { return code === 36 }
17790 if (code < 91) { return true }
17791 if (code < 97) { return code === 95 }
17792 if (code < 123) { return true }
17793 if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) }
17794 if (astral === false) { return false }
17795 return isInAstralSet(code, astralIdentifierStartCodes)
17796}
17797
17798// Test whether a given character is part of an identifier.
17799

Callers 2

browser.jsFile · 0.85
isRegExpIdentifierStartFunction · 0.85

Calls 2

isInAstralSetFunction · 0.85
testMethod · 0.80

Tested by

no test coverage detected