MCPcopy Create free account
hub / github.com/Effect-TS/effect / nextIntUnsafe

Function nextIntUnsafe

packages/effect/src/internal/random.ts:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10export const Random: Context.Reference<Random> = Context.Reference<Random>("effect/Random", {
11 defaultValue: () => ({
12 nextIntUnsafe() {
13 return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) +
14 Number.MIN_SAFE_INTEGER
15 },
16 nextDoubleUnsafe() {
17 return Math.random()
18 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected