(arr, rng = eventRng)
| 55 | const eventRng = Math.random.bind(Math); |
| 56 | |
| 57 | function pick(arr, rng = eventRng) { |
| 58 | return arr[Math.floor(rng() * arr.length)]; |
| 59 | } |
| 60 | |
| 61 | function randInt(min, max, rng = eventRng) { |
| 62 | return Math.floor(rng() * (max - min + 1)) + min; |
no outgoing calls
no test coverage detected