(server)
| 138 | } |
| 139 | |
| 140 | function findDefaultDoHServer(server) { |
| 141 | if (!server || typeof server !== 'object') return null; |
| 142 | const name = typeof server.name === 'string' ? server.name.trim().toLowerCase() : ''; |
| 143 | const url = typeof server.url === 'string' ? server.url.trim() : ''; |
| 144 | return DEFAULT_DNS_SERVERS.find(defaultServer => |
| 145 | (url && defaultServer.url === url) || |
| 146 | (name && defaultServer.name.toLowerCase() === name) |
| 147 | ) || null; |
| 148 | } |
| 149 | |
| 150 | function normalizeHostnameForStorage(value) { |
| 151 | if (typeof value !== 'string') return null; |
no outgoing calls
no test coverage detected