(path: string)
| 68 | } |
| 69 | |
| 70 | export function isAuxiliaryImagePath(path: string): boolean { |
| 71 | const segments = normalizeImagePath(path) |
| 72 | .split('/') |
| 73 | .filter(Boolean); |
| 74 | const firstAuxiliarySegment = getSegmentIndex( |
| 75 | segments, |
| 76 | segment => AUXILIARY_IMAGE_SEGMENTS.has(segment.toLowerCase()) |
| 77 | ); |
| 78 | |
| 79 | if (firstAuxiliarySegment === -1) { |
| 80 | return false; |
| 81 | } |
| 82 | |
| 83 | const firstImageRootSegment = getSegmentIndex(segments, isCanonicalImageRootSegment); |
| 84 | return firstImageRootSegment === -1 || firstAuxiliarySegment < firstImageRootSegment; |
| 85 | } |
| 86 | |
| 87 | export function isMaskImagePath(path: string): boolean { |
| 88 | const segments = normalizeImagePath(path) |
no test coverage detected