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

Function indent

lib/MultiStats.js:25–28  ·  view source on GitHub ↗
(str, prefix)

Source from the content-addressed store, hash-verified

23 * @returns {string} indent
24 */
25const indent = (str, prefix) => {
26 const rem = str.replace(/\n([^\n])/g, `\n${prefix}$1`);
27 return prefix + rem;
28};
29
30/** @typedef {StatsOptions} MultiStatsOptions */
31/** @typedef {{ version: boolean, hash: boolean, errorsCount: boolean, warningsCount: boolean, errors: boolean, warnings: boolean, children: NormalizedStatsOptions[] }} ChildOptions */

Callers 1

toStringMethod · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected