Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
19
node_modules/d3-array/src/intersection.js
generated
vendored
Normal file
19
node_modules/d3-array/src/intersection.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import {InternSet} from "internmap";
|
||||
|
||||
export default function intersection(values, ...others) {
|
||||
values = new 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 InternSet ? values : new InternSet(values);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue