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

Function densify

telemetry-dashboard/src/api.ts:128–130  ·  view source on GitHub ↗

Turns day-keyed rows into a dense series aligned to `labels`.

(labels: string[], byDay: Map<string, number>)

Source from the content-addressed store, hash-verified

126
127/** Turns day-keyed rows into a dense series aligned to `labels`. */
128function densify(labels: string[], byDay: Map<string, number>): number[] {
129 return labels.map((day) => byDay.get(day) ?? 0);
130}
131
132// ---------------------------------------------------------------------------
133// Dimensions

Callers 1

fillFunction · 0.85

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected