Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/hydro-dev/Hydro
/ randomPick
Function
randomPick
framework/utils/lib/common.ts:195–197 ·
view source on GitHub ↗
(arr: T[])
Source
from the content-addressed store, hash-verified
193
}
194
195
export
function
randomPick<T>(arr: T[]): T {
196
return
arr[Math.floor(Math.random() * arr.length)];
197
}
198
199
export
type
StringKeys<O> = {
200
[K in keyof O]: string extends O[K] ? K : never
Callers
1
base.ts
File · 0.90
Calls
1
random
Method · 0.80
Tested by
no test coverage detected