- enhance handling for exhaustive matching

- exhaustive will apply on rules and labels alike
- simplify code
- introduce new testcases to check the new behavior
This commit is contained in:
Mike Penz
2023-01-06 09:13:30 +00:00
committed by GitHub
parent f2b16254cf
commit 50dd476bd1
6 changed files with 170 additions and 238 deletions
+2 -2
View File
@@ -166,10 +166,10 @@ export function createOrSet<T>(map: Map<string, T[]>, key: string, value: T): vo
}
}
export function haveCommonElements(arr1: string[], arr2: Set<string>): Boolean {
export function haveCommonElements(arr1: string[], arr2: Set<string>): boolean {
return arr1.some(item => arr2.has(item))
}
export function haveEveryElements(arr1: string[], arr2: Set<string>): Boolean {
export function haveEveryElements(arr1: string[], arr2: Set<string>): boolean {
return arr1.every(item => arr2.has(item))
}