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

Function writeLines

test/fixtures/snapshot/typescript.js:114081–114092  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

114079 }
114080 }
114081 function writeLines(text) {
114082 var lines = text.split(/\r\n?|\n/g);
114083 var indentation = ts.guessIndentation(lines);
114084 for (var _a = 0, lines_3 = lines; _a < lines_3.length; _a++) {
114085 var lineText = lines_3[_a];
114086 var line = indentation ? lineText.slice(indentation) : lineText;
114087 if (line.length) {
114088 writeLine();
114089 write(line);
114090 }
114091 }
114092 }
114093 function writeLinesAndIndent(lineCount, writeSpaceIfNotIndenting) {
114094 if (lineCount) {
114095 increaseIndent();

Callers 1

emitHelpersFunction · 0.85

Calls 4

writeLineFunction · 0.70
writeFunction · 0.70
sliceMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…