An optional iterable of values to add to the set.
Returns the string literal 'Set' for use by Object.prototype.toString. This allows for identifying Sets without checking constructor identity.
Returns the number of members in the set.
Returns an IterableIterator of each member of the set.
Add a value to the set. If the value is already contained in the set, it will not be added a second time.
The value to add
Remove all values from the set.
Removes a particular value from the set. If the value was contained in
the set prior to this method being called, true
will be returned; if
the value was not in the set, false
will be returned. In either case,
the value provided will not be in the set after this method returns.
The value to remove from the set.
Returns an iterable two-member tuples for each item in the set, where the item is provided twice.
Part of the ES2015 Set specification for compatibility with Map objects.
Invokes a callback once for each member of the set.
The function to invoke with each set member
The this
context on which to invoke the callback
Determines if a provided value is already a member of the set.
The value against which set members should be checked
Returns an IterableIterator of each member of the set.
Returns an IterableIterator of each member of the set.
Creates a new ObjectSet and optionally seeds it with values.