{ } qjs-modules

extendSet

Source: lib/extendSet.js (pure JS) — default export: extendSet

Installs the set-algebra methods (TC39 Set-methods proposal) onto Set.prototype.

Exports

ExportArgsKindDescription
extendSet(proto=Set.prototype, ctor=Set)0–2functionInstalls the extensions. (default export)
SetExtensions—constThe prototype method bag.
SetStatic—constThe static helper bag.

Added Set.prototype methods

MethodDescription
union(other)Elements in either set.
intersection(other)Elements in both sets.
difference(other)Elements in this set but not other.
symmetricDifference(other)Elements in exactly one set.
isSubsetOf(other)Whether this set is contained in other.
isSupersetOf(other)Whether this set contains other.
isDisjointFrom(other)Whether the sets share no elements.