Skip to main content

Sets

import { arrayToSet, difference, intersection } from '@rtorcato/js-common/sets'

Exports

NameSummary
arrayToSetConverts an array to a set.
differenceReturns the difference of two sets (elements in a not in b).
intersectionReturns the intersection of two sets.
isSubsetReturns true if set a is a subset of set b.
isSupersetReturns true if set a is a superset of set b.
setToArrayConverts a set to an array.
unionReturns the union of two sets.