MCPcopy
hub / github.com/webpack/webpack / toString

Method toString

lib/MultiStats.js:199–219  ·  view source on GitHub ↗

* Returns a string representation. * @param {StatsValue=} options stats options * @returns {string} string output

(options)

Source from the content-addressed store, hash-verified

197 * @returns {string} string output
198 */
199 toString(options) {
200 const childOptions = this._createChildOptions(options, {
201 forToString: true
202 });
203 const results = this.stats.map((stat, idx) => {
204 const str = stat.toString(childOptions.children[idx]);
205 const compilationName = stat.compilation.name;
206 const name =
207 compilationName &&
208 identifierUtils
209 .makePathsRelative(
210 stat.compilation.compiler.context,
211 compilationName,
212 stat.compilation.compiler.root
213 )
214 .replace(/\|/g, " ");
215 if (!str) return str;
216 return name ? `${name}:\n${indent(str, " ")}` : str;
217 });
218 return results.filter(Boolean).join("\n\n");
219 }
220}
221
222module.exports = MultiStats;

Callers

nothing calls this directly

Calls 3

_createChildOptionsMethod · 0.95
indentFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected