Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
*/
756
function
randomChoice(arr) {
757
return
arr[Math.floor(Math.random() * arr.length)];
758
}
759
760
/**
761
* 生成随机数字字符串
Callers
8
generateFirstName
Function · 0.70
generateLastName
Function · 0.70
generateUsername
Function · 0.70
generateEmail
Function · 0.70
generatePhone
Function · 0.70
generateAddress
Function · 0.70
selectLocation
Function · 0.70
generateZipCode
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected