MCPcopy Create free account
hub / github.com/modem-dev/hunk / formatNumber

Function formatNumber

scripts/compare-release-benchmarks.ts:270–280  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

268}
269
270function formatNumber(value: number) {
271 if (!Number.isFinite(value)) {
272 return "∞";
273 }
274
275 if (Math.abs(value) >= 100) {
276 return value.toFixed(1);
277 }
278
279 return value.toFixed(2);
280}
281
282function formatDeltaPercent(value: number) {
283 if (!Number.isFinite(value)) {

Callers 2

formatThresholdValueFunction · 0.85
formatComparisonMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected