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

Function share

__tests__/explore-allocation-1500.test.ts:198–202  ·  view source on GitHub ↗
(predicate: (p: string) => boolean)

Source from the content-addressed store, hash-verified

196
197 describe('budget allocation', () => {
198 const share = (predicate: (p: string) => boolean) => {
199 let total = 0;
200 for (const [file, n] of bytes) if (predicate(file)) total += n;
201 return total / response.length;
202 };
203 const answerShare = () => share((p) => startsWithAny(p, ANSWER_PREFIXES));
204 const generatedShare = () => share((p) => p.startsWith(GENERATED_PREFIX));
205

Callers 2

answerShareFunction · 0.70
generatedShareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected