@visx/vendor
Version:
vendored packages for visx
23 lines (22 loc) • 592 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = intersection;
var _index = require("../../../vendor-cjs/internmap/src/index.js");
function intersection(values, ...others) {
values = new _index.InternSet(values);
others = others.map(set);
out: for (const value of values) {
for (const other of others) {
if (!other.has(value)) {
values.delete(value);
continue out;
}
}
}
return values;
}
function set(values) {
return values instanceof _index.InternSet ? values : new _index.InternSet(values);
}
;