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

Function formatReportScore

packages/utils/src/lib/reports/utils.ts:29–36  ·  view source on GitHub ↗
(score: number)

Source from the content-addressed store, hash-verified

27}
28
29export function formatReportScore(score: number): string {
30 const scaledScore = score * 100;
31 const roundedScore = Math.round(scaledScore);
32
33 return roundedScore === 100 && score !== 1
34 ? Math.floor(scaledScore).toString()
35 : roundedScore.toString();
36}
37
38export function formatScoreWithColor(
39 score: number,

Callers 8

formatBaseAuditOutputFunction · 0.90
logResultsForAllUrlsFunction · 0.90
categoriesDetailsSectionFunction · 0.85
formatScoreWithColorFunction · 0.85
applyScoreColorFunction · 0.85
auditDetailsAuditValueFunction · 0.85
utils.unit.test.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected