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

Function scoreMarker

packages/utils/src/lib/reports/utils.ts:63–74  ·  view source on GitHub ↗
(
  score: number,
  markerType: MarkerShape = 'circle',
)

Source from the content-addressed store, hash-verified

61};
62
63export function scoreMarker(
64 score: number,
65 markerType: MarkerShape = 'circle',
66): string {
67 if (score >= SCORE_COLOR_RANGE.GREEN_MIN) {
68 return MARKERS[markerType].green;
69 }
70 if (score >= SCORE_COLOR_RANGE.YELLOW_MIN) {
71 return MARKERS[markerType].yellow;
72 }
73 return MARKERS[markerType].red;
74}
75
76export function getDiffMarker(diff: number): string {
77 if (diff > 0) {

Callers 8

categoriesDetailsSectionFunction · 0.85
categoryRefFunction · 0.85
categoryGroupItemFunction · 0.85
formatScoreWithColorFunction · 0.85
auditDetailsAuditValueFunction · 0.85
createDiffAuditsSectionFunction · 0.85
utils.unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected