MCPcopy
hub / github.com/webpack/webpack / joinError

Function joinError

lib/stats/DefaultStatsPrinterPlugin.js:1311–1322  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

1309 */
1310const joinError =
1311 (error) =>
1312 /**
1313 * Handles the callback logic for this hook.
1314 * @param {Item[]} items items
1315 * @param {StatsPrinterContextWithExtra} ctx context
1316 * @returns {string} result
1317 */
1318 (items, { red, yellow }) =>
1319 `${error ? red("ERROR") : yellow("WARNING")} in ${joinExplicitNewLine(
1320 items,
1321 ""
1322 )}`;
1323
1324/** @typedef {{ element: string, content: string | undefined }} Item */
1325/** @typedef {(items: Item[], context: StatsPrinterContextWithExtra & Required<KnownStatsPrinterContext>) => string} SimpleElementJoiner */

Callers 1

Calls 1

joinExplicitNewLineFunction · 0.85

Tested by

no test coverage detected