MCPcopy Index your code
hub / github.com/RandomAPI/Randomuser.me-Node / randomItem

Function randomItem

api/1.4/api.js:438–440  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

436}
437
438function randomItem(arr) {
439 return arr[range(0, arr.length-1)];
440}
441
442function range(min, max) {
443 return min + mersenne.rand(max-min+1);

Callers 11

generateMethod · 0.70
randomNameMethod · 0.70
genPasswordMethod · 0.70
genSVNRFunction · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50
inject.jsFile · 0.50

Calls 1

rangeFunction · 0.70

Tested by

no test coverage detected