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

Function createDeterministicRandom

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

Source from the content-addressed store, hash-verified

46}
47
48export function createDeterministicRandom(seed: number) {
49 let state = seed >>> 0
50
51 return () => {
52 state = (state * 1664525 + 1013904223) >>> 0
53 return state / 0x100000000
54 }
55}
56
57export function randomSegment(random: () => number) {
58 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