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

Function createDeterministicRandom

benchmarks/memory/server/bench-utils.ts:30–37  ·  view source on GitHub ↗
(seed: number)

Source from the content-addressed store, hash-verified

28}
29
30export function createDeterministicRandom(seed: number) {
31 let state = seed >>> 0
32
33 return () => {
34 state = (state * 1664525 + 1013904223) >>> 0
35 return state / 0x100000000
36 }
37}
38
39export function randomSegment(random: () => number) {
40 return Math.floor(random() * 1_000_000_000).toString(36)

Callers 4

shared.tsFile · 0.90
createFixturesFunction · 0.90
shared.tsFile · 0.90
runSequentialRequestLoopFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected