(host)
| 1297 | return host.substring(0, idx); |
| 1298 | } |
| 1299 | function getServerName(host) { |
| 1300 | if (!host) { |
| 1301 | return null; |
| 1302 | } |
| 1303 | assert(typeof host === "string"); |
| 1304 | const servername = getHostname(host); |
| 1305 | if (net.isIP(servername)) { |
| 1306 | return ""; |
| 1307 | } |
| 1308 | return servername; |
| 1309 | } |
| 1310 | function deepClone(obj) { |
| 1311 | return JSON.parse(JSON.stringify(obj)); |
| 1312 | } |
no test coverage detected