MCPcopy Index your code
hub / github.com/jashkenas/underscore / random

Function random

underscore-node-f.cjs:816–822  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

814
815// Return a random integer between `min` and `max` (inclusive).
816function random(min, max) {
817 if (max == null) {
818 max = min;
819 min = 0;
820 }
821 return min + Math.floor(Math.random() * (max - min + 1));
822}
823
824// A (possibly faster) way to get the current timestamp as an integer.
825var now = Date.now || function() {

Callers 1

sampleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…