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

Function selectLocation

scripts/generators.js:968–972  ·  view source on GitHub ↗

* 选择一个城市位置(返回城市、州、邮编前缀)

(country)

Source from the content-addressed store, hash-verified

966 * 选择一个城市位置(返回城市、州、邮编前缀)
967 */
968function selectLocation(country) {
969 const locations = CITY_STATE_MAP[country] || CITY_STATE_MAP['United States'];
970 currentLocation = randomChoice(locations);
971 return currentLocation;
972}
973
974/**
975 * 根据 IP 检测的城市和州设置位置(直接使用 IP 返回的信息)

Callers 3

selectLocationByCityFunction · 0.85
generateCityFunction · 0.85
regenerateFieldFunction · 0.85

Calls 1

randomChoiceFunction · 0.70

Tested by

no test coverage detected