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

Function formatDiffNumber

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

Source from the content-addressed store, hash-verified

96}
97
98export function formatDiffNumber(diff: number): string {
99 const number =
100 Math.abs(diff) === Number.POSITIVE_INFINITY ? '∞' : `${Math.abs(diff)}`;
101 const sign = diff < 0 ? '−' : '+';
102 return `${sign}${number}`;
103}
104
105export function severityMarker(severity: 'info' | 'warning' | 'error'): string {
106 if (severity === 'error') {

Callers 3

formatScoreChangeFunction · 0.85
formatValueChangeFunction · 0.85
utils.unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected