mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-05 07:52:07 +08:00
11 lines
255 B
JavaScript
11 lines
255 B
JavaScript
// Replace with a good standard lib maybe?
|
|
|
|
export function setEquals(A, B) {
|
|
const X = intersection(A, B);
|
|
return A.size == X.size && B.size == X.size;
|
|
}
|
|
|
|
export function intersection(A, B) {
|
|
return new Set([...A].filter((x) => B.has(x)));
|
|
}
|