()
| 47 | * Drop-in replacement for `Math.random()`. |
| 48 | */ |
| 49 | export function randomFloat(): number { |
| 50 | const [value] = crypto.getRandomValues(new Uint32Array(1)) |
| 51 | return value / 0x100000000 |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Returns a cryptographically secure random integer in [min, max). |
no outgoing calls
no test coverage detected