MCPcopy Index your code
hub / github.com/refined-github/refined-github / randomArrayItem

Function randomArrayItem

source/helpers/math.ts:46–48  ·  view source on GitHub ↗
(items: T[])

Source from the content-addressed store, hash-verified

44}
45
46export function randomArrayItem<T>(items: T[]): T {
47 return items.at(Math.floor(Math.random() * items.length))!;
48}

Callers 2

initFunction · 0.85
quickApproveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected