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

Function pick

apps/api/e2e/session-stress.ts:75–75  ·  view source on GitHub ↗
(arr: T[])

Source from the content-addressed store, hash-verified

73];
74const WORDS = ['alpha', 'beta', 'gamma', 'sverige', 'katt', 'planet'];
75const pick = <T>(arr: T[]): T => arr[Math.floor(Math.random() * arr.length)]!;
76
77function randomProps(ip: string): Record<string, unknown> {
78 const props: Record<string, unknown> = { __ip: ip };

Callers 5

randomPropsFunction · 0.70
sendSessionEventFunction · 0.70
getStringHeadersFunction · 0.50
requestLoggingHookFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected