MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / pick

Function pick

scripts/seed-events.mjs:57–59  ·  view source on GitHub ↗
(arr, rng = eventRng)

Source from the content-addressed store, hash-verified

55const eventRng = Math.random.bind(Math);
56
57function pick(arr, rng = eventRng) {
58 return arr[Math.floor(rng() * arr.length)];
59}
60
61function randInt(min, max, rng = eventRng) {
62 return Math.floor(rng() * (max - min + 1)) + min;

Callers 3

generateIdentityFunction · 0.70
buildSessionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected