mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-27 15:58:48 +00:00
930cf6633c
fix: Additional vi.mock path corrections and prettier formatting
12 lines
397 B
TypeScript
12 lines
397 B
TypeScript
import { logger } from '../../../../logger/index.ts';
|
|
import { minimatch } from '../../../../util/minimatch.ts';
|
|
|
|
export function matchesAnyPattern(val: string, patterns: string[]): boolean {
|
|
const res = patterns.some(
|
|
(pattern) =>
|
|
pattern === `${val}/` || minimatch(pattern, { dot: true }).match(val),
|
|
);
|
|
logger.trace({ val, patterns, res }, `matchesAnyPattern`);
|
|
return res;
|
|
}
|