(bareOrigin: string, token: string | undefined)
| 15 | * returned. |
| 16 | */ |
| 17 | export function buildOpenableUrl(bareOrigin: string, token: string | undefined): string { |
| 18 | const base = bareOrigin.endsWith('/') ? bareOrigin.slice(0, -1) : bareOrigin; |
| 19 | return token === undefined ? `${base}/` : `${base}/#token=${token}`; |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Split a full URL into the part before `#token=` and the `#token=…` fragment |
no outgoing calls
no test coverage detected