MCPcopy Index your code
hub / github.com/node-modules/utility / random256

Function random256

benchmark/random_integer.cjs:9–11  ·  view source on GitHub ↗
(upper)

Source from the content-addressed store, hash-verified

7const suite = new Benchmark.Suite();
8
9function random256(upper) {
10 return crypto.randomBytes(1)[0] % upper;
11}
12
13function random65536(upper) {
14 return crypto.randomBytes(2).readUIntBE(0, 2) % upper;

Callers 1

random_integer.cjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…