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

Function getSegmentIndex

src/utils/imageFileLookupPolicy.ts:32–43  ·  view source on GitHub ↗
(
  segments: string[],
  predicate: (segment: string) => boolean
)

Source from the content-addressed store, hash-verified

30}
31
32function getSegmentIndex(
33 segments: string[],
34 predicate: (segment: string) => boolean
35): number {
36 for (let i = 0; i < segments.length; i++) {
37 if (predicate(segments[i])) {
38 return i;
39 }
40 }
41
42 return -1;
43}
44
45export interface UrlCandidate {
46 url: string;

Callers 2

isAuxiliaryImagePathFunction · 0.85
isMaskImagePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected