* Check if two sets are equal (contain the same elements).
(set1: Set<T>, set2: Set<T>)
| 17 | * Check if two sets are equal (contain the same elements). |
| 18 | */ |
| 19 | equals<T>(set1: Set<T>, set2: Set<T>): boolean { |
| 20 | if (set1.size !== set2.size) { |
| 21 | return false; |
| 22 | } |
| 23 | for (const item of set1) { |
| 24 | if (!set2.has(item)) { |
| 25 | return false; |
| 26 | } |
| 27 | } |
| 28 | return true; |
| 29 | }, |
| 30 | |
| 31 | /** |
| 32 | * Return a new set with `item` toggled — removed if present, added if not. |
nothing calls this directly
no test coverage detected
searching dependent graphs…