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

Function med

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

Source from the content-addressed store, hash-verified

6const rows = readFileSync(process.argv[2], 'utf8').split('\n').filter(Boolean).map(l => JSON.parse(l));
7
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);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected