MCPcopy Create free account
hub / github.com/RandomAPI/Randomuser.me-Node / randomItem

Function randomItem

api/1.2/api.js:400–402  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

398}
399
400function randomItem(arr) {
401 return arr[range(0, arr.length-1)];
402}
403
404function range (min, max) {
405 return min + mersenne.rand(max-min+1);

Callers 7

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

Calls 1

rangeFunction · 0.70

Tested by

no test coverage detected