An abstract collection that implements many generic methods, reusable by most sets.
Returns the set of values including all values from both of these sets.
Returns the set of values that are in both of these sets.
Returns the set of values that are in this set, excluding the values that are also in the other set.
Returns the set of values that are only in one of these sets.
An alias for delete(value)
on sets that increases the overlap with the W3C DOMTokenList
interface, implemented by classList
.
An alias for has(value)
on sets that increases the overlap with the W3C DOMTokenList
interface, implemented by classList
.
Toggles the existence of a value in a set.
Deletes every value equivalent to the given value from the collection.
Used by JSON.stringify
to create a JSON representation of the collection.
Returns whether this collection is equivalent to the given collection.
require("collections/shim-object");
var GenericSet = require("collections/generic-set");
Object.addEach(MySet.prototype, GenericSet.prototype);