(server)
| 109 | } |
| 110 | |
| 111 | function 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 | |
| 119 | function countryBadgeHTML(server, extraClasses = '') { |
| 120 | const label = countryLabel(server); |
no test coverage detected