MCPcopy Index your code
hub / github.com/nodejs/node / transitionFromLowerToUpper

Function transitionFromLowerToUpper

test/fixtures/snapshot/typescript.js:142820–142837  ·  view source on GitHub ↗
(identifier, word, index)

Source from the content-addressed store, hash-verified

142818 && every(identifier, isUpperCaseLetter, wordStart, index);
142819 }
142820 function transitionFromLowerToUpper(identifier, word, index) {
142821 var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1));
142822 var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index));
142823 // See if the casing indicates we're starting a new word. Note: if we're breaking on
142824 // words, then just seeing an upper case character isn't enough. Instead, it has to
142825 // be uppercase and the previous character can't be uppercase.
142826 //
142827 // For example, breaking "AddMetadata" on words would make: Add Metadata
142828 //
142829 // on characters would be: A dd M etadata
142830 //
142831 // Break "AM" on words would be: AM
142832 //
142833 // on characters would be: A M
142834 //
142835 // We break the search string on characters. But we break the symbol name on words.
142836 return currentIsUpper && (!word || !lastIsUpper);
142837 }
142838 function everyInRange(start, end, pred) {
142839 for (var i = start; i < end; i++) {
142840 if (!pred(i)) {

Callers 1

breakIntoSpansFunction · 0.85

Calls 1

isUpperCaseLetterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…