MCPcopy Create free account
hub / github.com/code-pushup/cli / formatScoreWithColor

Function formatScoreWithColor

packages/utils/src/lib/reports/utils.ts:38–46  ·  view source on GitHub ↗
(
  score: number,
  options?: { skipBold?: boolean },
)

Source from the content-addressed store, hash-verified

36}
37
38export function formatScoreWithColor(
39 score: number,
40 options?: { skipBold?: boolean },
41): InlineText {
42 const styledNumber = options?.skipBold
43 ? formatReportScore(score)
44 : md.bold(formatReportScore(score));
45 return md`${scoreMarker(score)} ${styledNumber}`;
46}
47
48export type MarkerShape = 'circle' | 'square';
49export type ScoreColors = 'red' | 'yellow' | 'green';

Callers 3

createCategoriesTableFunction · 0.85
createDiffGroupsSectionFunction · 0.85
utils.unit.test.tsFile · 0.85

Calls 2

formatReportScoreFunction · 0.85
scoreMarkerFunction · 0.85

Tested by

no test coverage detected