MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / formatDelta

Function formatDelta

tests/loadtest/tools/dashboard/app.js:1467–1477  ·  view source on GitHub ↗
(leftValue, rightValue, formatter)

Source from the content-addressed store, hash-verified

1465}
1466
1467function formatDelta(leftValue, rightValue, formatter) {
1468 if (leftValue === null || leftValue === undefined || rightValue === null || rightValue === undefined) {
1469 return "n/a";
1470 }
1471 const diff = rightValue - leftValue;
1472 if (!Number.isFinite(diff)) {
1473 return "n/a";
1474 }
1475 const prefix = diff > 0 ? "+" : "";
1476 return `${prefix}${formatter(diff)}`;
1477}
1478
1479function describeDelta(leftValue, rightValue, formatter) {
1480 if (leftValue === null || leftValue === undefined || rightValue === null || rightValue === undefined) {

Callers 2

renderCompareChecksFunction · 0.85
compareMetricRowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected