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

Function isLineBreak

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

Source from the content-addressed store, hash-verified

10408 }
10409 ts.isWhiteSpaceSingleLine = isWhiteSpaceSingleLine;
10410 function isLineBreak(ch) {
10411 // ES5 7.3:
10412 // The ECMAScript line terminator characters are listed in Table 3.
10413 // Table 3: Line Terminator Characters
10414 // Code Unit Value Name Formal Name
10415 // \u000A Line Feed <LF>
10416 // \u000D Carriage Return <CR>
10417 // \u2028 Line separator <LS>
10418 // \u2029 Paragraph separator <PS>
10419 // Only the characters in Table 3 are treated as line terminators. Other new line or line
10420 // breaking characters are treated as white space but not as line terminators.
10421 return ch === 10 /* CharacterCodes.lineFeed */ ||
10422 ch === 13 /* CharacterCodes.carriageReturn */ ||
10423 ch === 8232 /* CharacterCodes.lineSeparator */ ||
10424 ch === 8233 /* CharacterCodes.paragraphSeparator */;
10425 }
10426 ts.isLineBreak = isLineBreak;
10427 function isDigit(ch) {
10428 return ch >= 48 /* CharacterCodes._0 */ && ch <= 57 /* CharacterCodes._9 */;

Callers 10

computeLineStartsFunction · 0.85
isWhiteSpaceLikeFunction · 0.85
skipTriviaFunction · 0.85
isConflictMarkerTriviaFunction · 0.85
scanConflictMarkerTriviaFunction · 0.85
iterateCommentRangesFunction · 0.85
scanStringFunction · 0.85
scanFunction · 0.85
reScanSlashTokenFunction · 0.85
scanJsxTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…