cleaned up viewers

This commit is contained in:
Andrea Pozzetti
2026-02-12 21:30:40 +01:00
parent a04466be8d
commit 1ee4969db6
5455 changed files with 619361 additions and 5667 deletions
+19
View 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);
}