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

Function randomItem

api/1.3/api.js:426–428  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

424}
425
426function randomItem(arr) {
427 return arr[range(0, arr.length-1)];
428}
429
430function range (min, max) {
431 return min + mersenne.rand(max-min+1);

Callers 8

generateMethod · 0.70
randomNameMethod · 0.70
genPasswordMethod · 0.70
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