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

Function isIdentifierChar

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

Source from the content-addressed store, hash-verified

17798// Test whether a given character is part of an identifier.
17799
17800function isIdentifierChar(code, astral) {
17801 if (code < 48) { return code === 36 }
17802 if (code < 58) { return true }
17803 if (code < 65) { return false }
17804 if (code < 91) { return true }
17805 if (code < 97) { return code === 95 }
17806 if (code < 123) { return true }
17807 if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) }
17808 if (astral === false) { return false }
17809 return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
17810}
17811
17812// ## Token types
17813

Callers 2

browser.jsFile · 0.85
isRegExpIdentifierPartFunction · 0.85

Calls 2

isInAstralSetFunction · 0.85
testMethod · 0.80

Tested by

no test coverage detected