MCPcopy Create free account
hub / github.com/debbide/GeoFill / randomChoice

Function randomChoice

scripts/generators.js:756–758  ·  view source on GitHub ↗

* 从数组中随机选择一个元素

(arr)

Source from the content-addressed store, hash-verified

754 * 从数组中随机选择一个元素
755 */
756function randomChoice(arr) {
757 return arr[Math.floor(Math.random() * arr.length)];
758}
759
760/**
761 * 生成随机数字字符串

Callers 8

generateFirstNameFunction · 0.70
generateLastNameFunction · 0.70
generateUsernameFunction · 0.70
generateEmailFunction · 0.70
generatePhoneFunction · 0.70
generateAddressFunction · 0.70
selectLocationFunction · 0.70
generateZipCodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected