(url, specUrl, { selectedServer="" } = {})
| 31 | * which can fail the URL resolution. |
| 32 | */ |
| 33 | export function safeBuildUrl(url, specUrl, { selectedServer="" } = {}) { |
| 34 | try { |
| 35 | return buildUrl(url, specUrl, { selectedServer }) |
| 36 | } catch { |
| 37 | return undefined |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | export function sanitizeUrl(url) { |
| 42 | if (typeof url !== "string" || url.trim() === "") { |
no test coverage detected
searching dependent graphs…