MCPcopy Create free account
hub / github.com/Snapchat/Valdi / matchesCompiledPatterns

Function matchesCompiledPatterns

npm_modules/cli/src/utils/fileUtils.ts:212–214  ·  view source on GitHub ↗
(compiledPatterns: RegExp[], filePath: string)

Source from the content-addressed store, hash-verified

210}
211
212function matchesCompiledPatterns(compiledPatterns: RegExp[], filePath: string): boolean {
213 return compiledPatterns.some(regex => regex.test(filePath));
214}
215
216function isPathAllowed(filePath: string, blacklist: RegExp[], whitelist: RegExp[]): boolean {
217 const normalizedPath = resolveFilePath(filePath);

Callers 1

isPathAllowedFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected