MCPcopy Create free account
hub / github.com/breck7/scroll / intersection

Function intersection

external/.d3.js:1325–1337  ·  view source on GitHub ↗
(values, ...others)

Source from the content-addressed store, hash-verified

1323}
1324
1325function intersection(values, ...others) {
1326 values = new InternSet(values);
1327 others = others.map(set$2);
1328 out: for (const value of values) {
1329 for (const other of others) {
1330 if (!other.has(value)) {
1331 values.delete(value);
1332 continue out;
1333 }
1334 }
1335 }
1336 return values;
1337}
1338
1339function set$2(values) {
1340 return values instanceof InternSet ? values : new InternSet(values);

Callers

nothing calls this directly

Calls 3

mapMethod · 0.80
hasMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected