MCPcopy Create free account
hub / github.com/Noumena-Network/code / isRecursiveLiteralDirectoryNamePattern

Function isRecursiveLiteralDirectoryNamePattern

src/utils/glob.ts:151–159  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

149}
150
151function isRecursiveLiteralDirectoryNamePattern(pattern: string): boolean {
152 const normalized = normalizeGlobPattern(pattern).replace(/\/+$/, '')
153 const parts = normalized.split('/').filter(Boolean)
154 const lastSegment = parts.at(-1) ?? ''
155 if (!lastSegment || hasGlobCharacters(lastSegment) || lastSegment.includes('.')) {
156 return false
157 }
158 return normalized.includes('**/')
159}
160
161async function isExactDirectoryPattern(
162 searchPattern: string,

Callers 1

globFunction · 0.85

Calls 2

normalizeGlobPatternFunction · 0.85
hasGlobCharactersFunction · 0.85

Tested by

no test coverage detected