MCPcopy Index your code
hub / github.com/codeaashu/claude-code / bucket

Function bucket

src/components/Stats.tsx:396–399  ·  view source on GitHub ↗
(min: number, max?: number)

Source from the content-addressed store, hash-verified

394 if (total > 0) {
395 const totalShots = Object.entries(dist).reduce((s_0, [count, sessions]) => s_0 + parseInt(count, 10) * sessions, 0);
396 const bucket = (min: number, max?: number) => Object.entries(dist).filter(([k]) => {
397 const n_0 = parseInt(k, 10);
398 return n_0 >= min && (max === undefined || n_0 <= max);
399 }).reduce((s_1, [, v]) => s_1 + v, 0);
400 const pct = (n_1: number) => Math.round(n_1 / total * 100);
401 const b1 = bucket(1, 1);
402 const b2_5 = bucket(2, 5);

Callers 2

OverviewTabFunction · 0.85
renderOverviewToAnsiFunction · 0.85

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected