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

Function next

__tests__/integration/lru-cache.test.ts:103–106  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

101 const cache = new LRUCache<number, number>(max);
102 let seed = 7;
103 const next = (n: number): number => {
104 seed = (seed * 1103515245 + 12345) & 0x7fffffff;
105 return (seed >>> 12) % n;
106 };
107 for (let i = 0; i < 50_000; i++) {
108 const key = next(40);
109 const op = next(10);

Callers 3

lru-cache.test.tsFile · 0.70
lineReaderFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected