(sets: Array<Set<T>>)
| 93 | * Unions multiple sets (OR logic) |
| 94 | */ |
| 95 | export function unionSets<T>(sets: Array<Set<T>>): Set<T> { |
| 96 | const result = new Set<T>() |
| 97 | for (const set of sets) { |
| 98 | for (const item of set) { |
| 99 | result.add(item) |
| 100 | } |
| 101 | } |
| 102 | return result |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Whether a value can be matched exactly by an index lookup, i.e. the index |
no test coverage detected