(conn?: ServerConnection.Any, ignoreDisplayName = false)
| 17 | } |
| 18 | |
| 19 | export function serverName(conn?: ServerConnection.Any, ignoreDisplayName = false) { |
| 20 | if (!conn) return "" |
| 21 | if (conn.displayName && !ignoreDisplayName) return conn.displayName |
| 22 | return conn.http.url.replace(/^https?:\/\//, "").replace(/\/+$/, "") |
| 23 | } |
| 24 | |
| 25 | function isLocalHost(url: string) { |
| 26 | const host = url.replace(/^https?:\/\//, "").split(":")[0] |
no outgoing calls
no test coverage detected