MCPcopy Create free account
hub / github.com/webpack/webpack-cli / formatItem

Method formatItem

packages/webpack-cli/src/webpack-cli.ts:1477–1488  ·  view source on GitHub ↗
(term: string, description: string)

Source from the content-addressed store, hash-verified

1475 // `helper.formatItem` is ANSI-aware (it pads using the visible width), so we
1476 // can colorize the term and keep every description column aligned.
1477 const formatItem = (term: string, description: string) => {
1478 if (description) {
1479 return helper.formatItem(
1480 bold(term),
1481 helper.padWidth(command, helper),
1482 description,
1483 helper,
1484 );
1485 }
1486
1487 return `${INDENT}${bold(term)}`;
1488 };
1489
1490 const formatList = (textArray: string[]) => textArray.join("\n");
1491

Callers

nothing calls this directly

Calls 1

padWidthMethod · 0.80

Tested by

no test coverage detected