MCPcopy Index your code
hub / github.com/Effect-TS/effect / random

Function random

packages/effect/src/Hash.ts:79–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 * @category hashing
78 */
79export 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

Callers 1

hashFunction · 0.85

Calls 3

numberFunction · 0.70
setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected