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

Function indexArchiveImages

src/utils/zipArchiveState.test.ts:24–34  ·  view source on GitHub ↗
(entries: Array<{ path: string; entry: ArchiveEntry }>)

Source from the content-addressed store, hash-verified

22}
23
24function indexArchiveImages(entries: Array<{ path: string; entry: ArchiveEntry }>): Map<string, ArchiveEntry> {
25 const index = new Map<string, ArchiveEntry>();
26 for (const { path, entry } of entries) {
27 for (const key of getArchiveImageLookupKeys(path)) {
28 if (!index.has(key)) {
29 index.set(key, entry);
30 }
31 }
32 }
33 return index;
34}
35
36describe('zip archive state', () => {
37 beforeEach(() => {

Callers 1

Calls 1

Tested by

no test coverage detected