Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 5x 5x 14x 14x 14x 14x 4x 10x | import { BlacklistItem, BlacklistType } from "../../../../../codeCharta.model" import { unifyWildCard } from "./unifyWildCard" export const isPatternBlacklisted = (blacklist: BlacklistItem[], blacklistType: BlacklistType, searchPattern: string) => { const paths: string[] = searchPattern.trim().split(",") Iif (searchPattern.trim().startsWith("!")) { paths[0] = paths[0].slice(1) for (const path of paths) { const pathNew = `!${unifyWildCard(path)}` Iif (blacklist.some(x => pathNew === x.path && blacklistType === x.type)) { return true } } return false } for (const path of paths) { if (blacklist.some(x => unifyWildCard(path) === x.path && blacklistType === x.type)) { return true } } return false } |