MCPcopy Create free account
hub / github.com/nodejs/node / isUpperCaseLetter

Function isUpperCaseLetter

test/fixtures/snapshot/typescript.js:142642–142654  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

142640 };
142641 }
142642 function isUpperCaseLetter(ch) {
142643 // Fast check for the ascii range.
142644 if (ch >= 65 /* CharacterCodes.A */ && ch <= 90 /* CharacterCodes.Z */) {
142645 return true;
142646 }
142647 if (ch < 127 /* CharacterCodes.maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 99 /* ScriptTarget.Latest */)) {
142648 return false;
142649 }
142650 // TODO: find a way to determine this for any unicode characters in a
142651 // non-allocating manner.
142652 var str = String.fromCharCode(ch);
142653 return str === str.toUpperCase();
142654 }
142655 function isLowerCaseLetter(ch) {
142656 // Fast check for the ascii range.
142657 if (ch >= 97 /* CharacterCodes.a */ && ch <= 122 /* CharacterCodes.z */) {

Callers 5

matchTextChunkFunction · 0.85
tryCamelCaseMatchFunction · 0.85
isWordCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected