(self)
| 77 | * @category hashing |
| 78 | */ |
| 79 | export const random: <A extends object>(self: A) => number = (self) => { |
| 80 | if (!randomHashCache.has(self)) { |
| 81 | randomHashCache.set(self, number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))) |
| 82 | } |
| 83 | return randomHashCache.get(self)! |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * @since 2.0.0 |