MCPcopy
hub / github.com/mongodb/node-mongodb-native / isSuperset

Function isSuperset

src/utils.ts:561–570  ·  view source on GitHub ↗
(set: Set<any> | any[], subset: Set<any> | any[])

Source from the content-addressed store, hash-verified

559}
560
561export 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

Callers 1

isRecordFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected