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

Function precompilePatterns

npm_modules/cli/src/utils/fileUtils.ts:208–210  ·  view source on GitHub ↗
(patterns?: string[])

Source from the content-addressed store, hash-verified

206}
207
208function precompilePatterns(patterns?: string[]): RegExp[] {
209 return patterns?.map(pattern => new RegExp(pattern)) ?? [];
210}
211
212function matchesCompiledPatterns(compiledPatterns: RegExp[], filePath: string): boolean {
213 return compiledPatterns.some(regex => regex.test(filePath));

Callers 1

copyFilesFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected