(value: string)
| 58 | |
| 59 | /** FNV-1a over the id — a stable, well-mixed seed from an opaque string. */ |
| 60 | const seedFrom = (value: string): number => { |
| 61 | let hash = 2_166_136_261; |
| 62 | for (let index = 0; index < value.length; index += 1) { |
| 63 | hash ^= value.charCodeAt(index); |
| 64 | hash = Math.imul(hash, 16_777_619); |
| 65 | } |
| 66 | return hash >>> 0; |
| 67 | }; |
| 68 | |
| 69 | /** |
| 70 | * mulberry32 — a tiny deterministic PRNG. |
no outgoing calls
no test coverage detected