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

Function getDiffMarker

packages/utils/src/lib/reports/utils.ts:76–84  ·  view source on GitHub ↗
(diff: number)

Source from the content-addressed store, hash-verified

74}
75
76export function getDiffMarker(diff: number): string {
77 if (diff > 0) {
78 return '↑';
79 }
80 if (diff < 0) {
81 return '↓';
82 }
83 return '';
84}
85
86export function colorByScoreDiff(text: string, diff: number): InlineText {
87 const color = diff > 0 ? 'green' : diff < 0 ? 'red' : 'gray';

Callers 2

formatScoreChangeFunction · 0.85
formatValueChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected