MCPcopy
hub / github.com/webpack/webpack / indent

Function indent

lib/node/nodeConsole.js:75–85  ·  view source on GitHub ↗
(str, prefix, colorFn)

Source from the content-addressed store, hash-verified

73 * @returns {string} indented string
74 */
75 const indent = (str, prefix, colorFn) => {
76 if (str === "") return str;
77 prefix = currentIndent + prefix;
78 return (
79 prefix +
80 str
81 .split("\n")
82 .map((line) => colorFn(line))
83 .join(`\n${prefix}`)
84 );
85 };
86
87 const clearStatusMessage = () => {
88 let lines = 0;

Callers 1

writeColoredFunction · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected