(url: string)
| 83 | * (.zip, .tar, .tar.gz/.tgz, .tar.bz2/.tbz2/.tbz, .tar.xz/.txz, .7z). |
| 84 | */ |
| 85 | export function isArchiveUrl(url: string): boolean { |
| 86 | try { |
| 87 | const pathname = new URL(url).pathname; |
| 88 | return hasArchiveExtension(pathname); |
| 89 | } catch { |
| 90 | return hasArchiveExtension(url); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * Check if a File is a supported archive |
no test coverage detected