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

Function removeLeadingNewlines

test/fixtures/snapshot/typescript.js:37596–37600  ·  view source on GitHub ↗
(comments)

Source from the content-addressed store, hash-verified

37594 return finishNode(factory.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : undefined, tagsArray), start, end);
37595 });
37596 function removeLeadingNewlines(comments) {
37597 while (comments.length && (comments[0] === "\n" || comments[0] === "\r")) {
37598 comments.shift();
37599 }
37600 }
37601 function removeTrailingWhitespace(comments) {
37602 while (comments.length && comments[comments.length - 1].trim() === "") {
37603 comments.pop();

Callers 2

parseJSDocCommentWorkerFunction · 0.85
parseTagCommentsFunction · 0.85

Calls 1

shiftMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…