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

Function generateEmail

scripts/generators.js:860–871  ·  view source on GitHub ↗

* 生成邮箱

(username, category = null)

Source from the content-addressed store, hash-verified

858 * 生成邮箱
859 */
860function generateEmail(username, category = null) {
861 // 如果设置了自定义后缀,优先使用
862 if (customEmailDomain) {
863 return `${username}@${customEmailDomain}`;
864 }
865 // 如果指定了类别
866 if (category && EMAIL_DOMAINS[category]) {
867 return `${username}@${randomChoice(EMAIL_DOMAINS[category])}`;
868 }
869 // 默认从通用邮箱中选择
870 return `${username}@${randomChoice(EMAIL_DOMAINS.common)}`;
871}
872
873/**
874 * 生成密码

Callers 3

generateAllInfoFunction · 0.85
regenerateFieldFunction · 0.85

Calls 1

randomChoiceFunction · 0.70

Tested by

no test coverage detected