MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / bucket

Function bucket

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

Source from the content-addressed store, hash-verified

301 if (total > 0) {
302 const totalShots = Object.entries(dist).reduce((s, [count, sessions]) => s + parseInt(count, 10) * sessions, 0);
303 const bucket = (min: number, max?: number) =>
304 Object.entries(dist)
305 .filter(([k]) => {
306 const n = parseInt(k, 10);
307 return n >= min && (max === undefined || n <= max);
308 })
309 .reduce((s, [, v]) => s + v, 0);
310 const pct = (n: number) => Math.round((n / total) * 100);
311 const b1 = bucket(1, 1);
312 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