(input: string)
| 4 | } |
| 5 | |
| 6 | export function stripQueryAndHash(input: string) { |
| 7 | const hashIndex = input.indexOf("#") |
| 8 | const queryIndex = input.indexOf("?") |
| 9 | |
| 10 | if (hashIndex !== -1 && queryIndex !== -1) { |
| 11 | return input.slice(0, Math.min(hashIndex, queryIndex)) |
| 12 | } |
| 13 | |
| 14 | if (hashIndex !== -1) return input.slice(0, hashIndex) |
| 15 | if (queryIndex !== -1) return input.slice(0, queryIndex) |
| 16 | return input |
| 17 | } |
| 18 | |
| 19 | export function unquoteGitPath(input: string) { |
| 20 | if (!input.startsWith('"')) return input |
no outgoing calls
no test coverage detected