MCPcopy Create free account
hub / github.com/TanStack/router / createDeterministicRandom

Function createDeterministicRandom

benchmarks/ssr/bench-utils.ts:24–31  ·  view source on GitHub ↗
(seed: number)

Source from the content-addressed store, hash-verified

22} satisfies RequestInit
23
24function createDeterministicRandom(seed: number) {
25 let state = seed >>> 0
26
27 return () => {
28 state = (state * 1664525 + 1013904223) >>> 0
29 return state / 0x100000000
30 }
31}
32
33function randomSegment(random: () => number) {
34 return Math.floor(random() * 1_000_000_000).toString(36)

Callers 6

createPayloadsFunction · 0.90
createPayloadsFunction · 0.90
createTransportInputsFunction · 0.90
runSsrRequestLoopFunction · 0.70
runRequestLoopFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected