(url)
| 107 | } |
| 108 | |
| 109 | export function removeHostFromUrl(url) { |
| 110 | try { |
| 111 | const urlObj = new URL(url); |
| 112 | const path = urlObj.pathname + urlObj.search + urlObj.hash; |
| 113 | return path.replace(/^\/+/g, '') |
| 114 | } catch (e) { |
| 115 | return url; |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | export function urlJoin(...args) { |
| 120 | const parts = Array.from(Array.isArray(args[0]) ? args[0] : args); |
no outgoing calls
no test coverage detected