MCPcopy Create free account
hub / github.com/BrainicHQ/DoHSpeedTest / countryLabel

Function countryLabel

script.js:111–117  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

109}
110
111function countryLabel(server) {
112 if (!server || typeof server !== 'object') return '';
113 const code = normalizeCountryCode(server.countryCode);
114 const country = typeof server.country === 'string' ? server.country.trim() : '';
115 if (!code || !country) return '';
116 return `${country} (${code})`;
117}
118
119function countryBadgeHTML(server, extraClasses = '') {
120 const label = countryLabel(server);

Callers 4

countryBadgeHTMLFunction · 0.85
renderDoHListFunction · 0.85
updateResultFunction · 0.85

Calls 1

normalizeCountryCodeFunction · 0.85

Tested by

no test coverage detected