MCPcopy Index your code
hub / github.com/microsoft/SandDance / intersection

Function intersection

docs/app/js/sanddance-app.js:145044–145054  ·  view source on GitHub ↗
(values, ...others)

Source from the content-addressed store, hash-verified

145042parcelHelpers.defineInteropFlag(exports);
145043var _internmap = require("internmap");
145044function intersection(values, ...others) {
145045 values = new (0, _internmap.InternSet)(values);
145046 others = others.map(set);
145047 out: for (const value of values){
145048 for (const other of others)if (!other.has(value)) {
145049 values.delete(value);
145050 continue out;
145051 }
145052 }
145053 return values;
145054}
145055exports.default = intersection;
145056function set(values) {
145057 return values instanceof (0, _internmap.InternSet) ? values : new (0, _internmap.InternSet)(values);

Callers

nothing calls this directly

Calls 2

hasMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected