
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
set-utilities
Advanced tools
High performance set theory - functional utilities which operate on arbitrary input sets.
High performance set theory.
This library is a collection of functional utilities from set theory, each of which operate on an arbitrary number of input sets.
Each function accepts variable arguments and operates with the principals of immutability: none of the input sets are modified in the process of calculation.
A ∖ BThe difference of sets contains all the elements of the first set, not contained in other sets.
import { difference } from 'set-utilities';
const differenceAB = difference(setA, setB);
const differenceABC = difference(setA, setB, setC);
A ∩ BThe intersection of sets contains all the elements each contained in every set.
import { intersection } from 'set-utilities';
const intersectionAB = intersection(setA, setB);
const intersectionABC = intersection(setA, setB, setC);
A ∪ BThe union of sets contains all the elements each contained in any set.
import { union } from 'set-utilities';
const unionAB = union(setA, setB);
const unionABC = union(setA, setB, setC);
A ∆ BThe symmetric difference of sets contains only the unique elements of each set.
import { xor } from 'set-utilities';
const xorAB = xor(setA, setB);
const xorABC = xor(setA, setB, setC);
A ∼ BSets are equivalent if they have the same cardinality, and there is a bijection between the elements contained in each set.
import { equivalence } from 'set-utilities';
const isEquivalentAB = equivalence(setA, setB);
const isEquivalentABC = equivalence(setA, setB, setC);
A ∩ B = ∅Sets are disjoint if they have no elements in common.
import { disjoint } from 'set-utilities';
const isDisjointAB = disjoint(setA, setB);
const isDisjointABC = disjoint(setA, setB, setC);
A ∩ B ∩ C = ∅A family of sets are pairwise disjoint if none of the sets share any elements in common.
import { pairwiseDisjoint } from 'set-utilities';
const isPairwiseDisjointAB = pairwiseDisjoint(setA, setB);
const isPairwiseDisjointABC = pairwiseDisjoint(setA, setB, setC);
A ⊆ BA set is a subset of another if all of its elements are contained in the other set.
import { subset } from 'set-utilities';
const isSubsetAB = subset(setA, setB);
const isSubsetABC = subset(setA, setB, setC);
A ⊂ BA set is a proper subset of another if all of its elements are contained in the other set, and it has a lower cardinality than the other set.
import { properSubset } from 'set-utilities';
const isProperSubsetAB = properSubset(setA, setB);
const isProperSubsetABC = properSubset(setA, setB, setC);
A ⊇ BA set is a superset of another if it contains all the elements contained in the other set.
import { superset } from 'set-utilities';
const isSupersetAB = superset(setA, setB);
const isSupersetABC = superset(setA, setB, setC);
A ⊃ BA set is a proper superset of another if it contains all the elements contained in the other set, and it has a greater cardinality than the other set.
import { properSuperset } from 'set-utilities';
const isProperSupersetAB = properSuperset(setA, setB);
const isProperSupersetABC = properSuperset(setA, setB, setC);
A ⇅An immutable sorting operation for sets.
import { sort } from 'set-utilities';
const sortedA = sort(setA);
const sortedB = sort(setB, compareFunction);
FAQs
High performance set theory - functional utilities which operate on arbitrary input sets.
The npm package set-utilities receives a total of 437 weekly downloads. As such, set-utilities popularity was classified as not popular.
We found that set-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.