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

Function setDifference

src/utils.ts:581–587  ·  view source on GitHub ↗
(setA: Iterable<T>, setB: Iterable<T>)

Source from the content-addressed store, hash-verified

579
580/** Returns the items that are uniquely in setA */
581export function setDifference<T>(setA: Iterable<T>, setB: Iterable<T>): Set<T> {
582 const difference = new Set<T>(setA);
583 for (const elem of setB) {
584 difference.delete(elem);
585 }
586 return difference;
587}
588
589const HAS_OWN = (object: unknown, prop: string) =>
590 Object.prototype.hasOwnProperty.call(object, prop);

Callers 6

parseOptionsFunction · 0.90
testCursorFunction · 0.85
index.test.tsFile · 0.85
error.test.tsFile · 0.85
dependency.test.tsFile · 0.85

Calls 1

deleteMethod · 0.45

Tested by 1

testCursorFunction · 0.68