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

Function densify

telemetry-dashboard/src/api.ts:136–138  ·  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

134
135/** Turns day-keyed rows into a dense series aligned to `labels`. */
136function densify(labels: string[], byDay: Map<string, number>): number[] {
137 return labels.map((day) => byDay.get(day) ?? 0);
138}
139
140// ---------------------------------------------------------------------------
141// Dimensions

Callers 1

fillFunction · 0.85

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected