Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CopilotKit/OpenGenerativeUI
/ pickRandom
Function
pickRandom
apps/app/src/app/pick/page.tsx:72–75 ·
view source on GitHub ↗
(arr: T[], n: number)
Source
from the content-addressed store, hash-verified
70
];
71
72
function pickRandom<T>(arr: T[], n: number): T[] {
73
const shuffled = [...arr].sort(() => Math.random() - 0.5);
74
return shuffled.slice(0, n);
75
}
76
77
export default function PickPageWrapper() {
78
return (
Callers
1
PickPage
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected