MCPcopy Index your code
hub / github.com/codeaashu/claude-code / pickRandom

Function pickRandom

src/utils/words.ts:777–779  ·  view source on GitHub ↗

* Pick a random element from an array

(array: readonly T[])

Source from the content-addressed store, hash-verified

775 * Pick a random element from an array
776 */
777function pickRandom<T>(array: readonly T[]): T {
778 return array[randomInt(array.length)]!
779}
780
781/**
782 * Generate a random word slug in the format "adjective-verb-noun"

Callers 2

generateWordSlugFunction · 0.85
generateShortWordSlugFunction · 0.85

Calls 1

randomIntFunction · 0.85

Tested by

no test coverage detected