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

Function normalizeLeadingWhitespace

deps/v8/tools/profview/profile-utils.js:646–656  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

644}
645
646function normalizeLeadingWhitespace(lines) {
647 let regex = /^\s*/;
648 let minimumLeadingWhitespaceChars = Infinity;
649 for (let line of lines) {
650 minimumLeadingWhitespaceChars =
651 Math.min(minimumLeadingWhitespaceChars, regex.exec(line)[0].length);
652 }
653 for (let i = 0; i < lines.length; i++) {
654 lines[i] = lines[i].substring(minimumLeadingWhitespaceChars);
655 }
656}

Callers 1

generateSourceViewMethod · 0.85

Calls 2

minMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…