MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / isArchiveUrl

Function isArchiveUrl

src/utils/zipLoader.ts:85–92  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

83 * (.zip, .tar, .tar.gz/.tgz, .tar.bz2/.tbz2/.tbz, .tar.xz/.txz, .7z).
84 */
85export 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

Callers 1

useUrlLoaderFunction · 0.90

Calls 1

hasArchiveExtensionFunction · 0.90

Tested by

no test coverage detected