MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / safeMathRandom

Function safeMathRandom

packages/core/src/utils/randomSafeContext.ts:33–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 * to ensure safe random number generation in certain contexts (e.g., Next.js Cache Components).
32 */
33export function safeMathRandom(): number {
34 return withRandomSafeContext(() => Math.random());
35}
36
37/**
38 * Identical to Date.now() but wrapped in withRandomSafeContext

Callers 8

_processEventFunction · 0.90
constructorMethod · 0.90
clearMethod · 0.90
getRandomByteFunction · 0.90
applyFunction · 0.90
startNewTraceFunction · 0.90

Calls 1

withRandomSafeContextFunction · 0.85

Tested by

no test coverage detected