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

Function random

__tests__/telemetry-services.test.ts:1230–1235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1228 // A fixed sequence of random numbers, so that a failure can be run again.
1229 let seed = 20261130;
1230 const random = (): number => {
1231 seed = (seed + 0x6d2b79f5) | 0;
1232 let x = Math.imul(seed ^ (seed >>> 15), 1 | seed);
1233 x = (x + Math.imul(x ^ (x >>> 7), 61 | x)) ^ x;
1234 return ((x ^ (x >>> 14)) >>> 0) / 4294967296;
1235 };
1236 const day = (n: number): string => `2026-10-${String(n).padStart(2, '0')}`;
1237 const pick = (): string => day(1 + Math.floor(random() * 14));
1238 const installEvent = (on: string, kind: string): Row => ({ event: 'install', ts: `${on}T10:00:00Z`, props: { scope: 'global', kind } });

Callers 2

pickFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected