MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / randomInt

Function randomInt

source code/utils/words.ts:769–774  ·  view source on GitHub ↗

* Generate a cryptographically random integer in the range [0, max)

(max: number)

Source from the content-addressed store, hash-verified

767 * Generate a cryptographically random integer in the range [0, max)
768 */
769function randomInt(max: number): number {
770 // Use crypto.randomBytes for better randomness than Math.random
771 const bytes = randomBytes(4)
772 const value = bytes.readUInt32BE(0)
773 return value % max
774}
775
776/**
777 * Pick a random element from an array

Callers 1

pickRandomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected