Private constructorStatic addStatic deleteStatic differenceReturn the difference (nonimplication) of two sets: the set of elements in a, but not in b.
a new Set containing the elements present only in a
https://github.com/tc39/proposal-set-methods
T - the type of elements in a
U - the type of elements in b
Static filterReturn a new set with elements that pass the provided predicate function.
the set to filter
function to test each element of the set
object to use as this when executing predicate
a new set with the elements that pass the test; if no elements pass, an empty set is returned
Static findReturn a value found in the set that satisfies the predicate, or null if none is found.
the set to search
function to test each element of the set
object to use as this when executing predicate
the item found, or null if none is found
Static hasReturn whether the provided element exists in the set.
Does the set have the given element?
Static intersectionReturn the intersection (conjunction) of two sets: the set of elements that are in both sets.
a new Set containing the elements present only in both a and b
https://github.com/tc39/proposal-set-methods
T - the type of elements in a
U - the type of elements in b
Static isTest whether two sets have “the same” elements.
Similar to xjs_Array.is, but for sets, the order of elements is not important.
Are corresponding elements the same, i.e. replaceable?
T - the type of elements in the sets
Static isReturn whether a is a subset of b: whether all elements of a are in b.
Note that if a is an empty set, this method returns true.
Is a a subset of b?
https://github.com/tc39/proposal-set-methods
T - the type of elements in a
U - the type of elements in b
Static isxjs_Set.isSubsetOf, but with the parameters switched.
exactly xjs.Set.isSubsetOf(b, a, predicate)
https://github.com/tc39/proposal-set-methods
T - the type of elements in a
U - the type of elements in b
Static mapReturn a new Set with the results of calling a provided function on every element in the given Set.
a new Set with transformed elements obtained from callback
https://github.com/tc39/proposal-collection-methods
T - the type of elements in the set
U - the type of new elements returned by the callback
Static symmetricReturn the symmetric difference (exclusive disjunction) of two sets: the set of elements either in one set, or in the other, but not both.
Equivalent to:
difference( union(a,b) , intersection(a,b) )union( difference(a,b) , difference(b,a) )a new Set containing the elements present only in a or only in b, but not both
https://github.com/tc39/proposal-set-methods
T - the type of elements in a
U - the type of elements in b
Static unionReturn the union (disjunction) of two sets: the set of elements that are in either set (or both sets).
a new Set containing the elements present in either a or b (or both)
https://github.com/tc39/proposal-set-methods
T - the type of elements in the a
U - the type of elements in the b
Additional static members for the native Set class.
Does not extend the native Set class.