(self)
| 189 | * @since 2.0.0 |
| 190 | */ |
| 191 | export const random: <A extends object>(self: A) => number = (self) => { |
| 192 | if (!randomHashCache.has(self)) { |
| 193 | randomHashCache.set(self, number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))) |
| 194 | } |
| 195 | return randomHashCache.get(self)! |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Combines two hash values into a single hash value. |