source: node_modules/victory-vendor/lib-vendor/d3-array/src/intersection.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 592 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = intersection;
7var _index = require("../../../lib-vendor/internmap/src/index.js");
8function intersection(values, ...others) {
9 values = new _index.InternSet(values);
10 others = others.map(set);
11 out: for (const value of values) {
12 for (const other of others) {
13 if (!other.has(value)) {
14 values.delete(value);
15 continue out;
16 }
17 }
18 }
19 return values;
20}
21function set(values) {
22 return values instanceof _index.InternSet ? values : new _index.InternSet(values);
23}
Note: See TracBrowser for help on using the repository browser.