MCPcopy
hub / github.com/trentm/node-bunyan / randint

Function randint

examples/long-running.js:23–25  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

21
22
23function randint(n) {
24 return Math.floor(Math.random() * n);
25}
26
27function randchoice(array) {
28 return array[randint(array.length)];

Callers 2

randchoiceFunction · 0.85
logOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected