MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / d2

Function d2

scripts/agent-eval/offload-eval-summarize.mjs:10–10  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

8const med = (xs) => { const a = xs.filter(x => x != null).sort((p, q) => p - q); if (!a.length) return null; const m = Math.floor(a.length / 2); return a.length % 2 ? a[m] : (a[m - 1] + a[m]) / 2; };
9const rng = (xs) => { const a = xs.filter(x => x != null); return a.length ? `${Math.min(...a)}–${Math.max(...a)}` : '—'; };
10const d2 = (x) => x == null ? '—' : (+x).toFixed(2);
11const d3 = (x) => x == null ? '—' : (+x).toFixed(3);
12const d4 = (x) => x == null ? '—' : (+x).toFixed(4);
13

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected