randomItem function ✓ 100.0%
Last updated: 2026-02-24T21:07:57.586Z
Location
Metrics
LOC: 3
Complexity: 1
Params: 1
Coverage: 100.0% (1/1 lines, 55x executed)
Signature
randomItem(arr: T[]): : T
Source Code
function randomItem<T>(arr: T[]): T {
return arr[Math.floor(Math.random() * arr.length)];
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| generatePhone | calls |