@xylabs/set
v5.0.97
Published
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Readme
@xylabs/set
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Install
Using npm:
npm install {{name}}Using yarn:
yarn add {{name}}Using pnpm:
pnpm add {{name}}Using bun:
bun add {{name}}License
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
Reference
packages
set
### .temp-typedoc
### functions
### <a id="difference"></a>differencefunction difference<TKey>(a, b): Set<TKey>;Returns a new set containing elements in a that are not in b.
Type Parameters
TKey
TKey
Parameters
a
Set<TKey>
The source set
b
Set<TKey>
The set of elements to exclude
Returns
Set<TKey>
A new set representing the difference of a and b
### <a id="intersection"></a>intersectionfunction intersection<TKey>(a, b): Set<TKey>;Returns a new set containing only elements present in both a and b.
Type Parameters
TKey
TKey
Parameters
a
Set<TKey>
The first set
b
Set<TKey>
The second set
Returns
Set<TKey>
A new set representing the intersection of a and b
### <a id="union"></a>unionfunction union<TKey>(a, b): Set<TKey>;Returns a new set containing all elements from both a and b.
Type Parameters
TKey
TKey
Parameters
a
Set<TKey>
The first set
b
Set<TKey>
The second set
Returns
Set<TKey>
A new set representing the union of a and b
