Function
isSuperset
(set: Set<any> | any[], subset: Set<any> | any[])
Source from the content-addressed store, hash-verified
| 559 | } |
| 560 | |
| 561 | export function isSuperset(set: Set<any> | any[], subset: Set<any> | any[]): boolean { |
| 562 | set = Array.isArray(set) ? new Set(set) : set; |
| 563 | subset = Array.isArray(subset) ? new Set(subset) : subset; |
| 564 | for (const elem of subset) { |
| 565 | if (!set.has(elem)) { |
| 566 | return false; |
| 567 | } |
| 568 | } |
| 569 | return true; |
| 570 | } |
| 571 | |
| 572 | /** |
| 573 | * Checks if the document is a Hello request |
Tested by
no test coverage detected