Type of data stored
Returns the number of items stored in the set
Add values to set.
Corresponding keys will be generated according to the
function provided to setMutable, or JSON.stringify by default.
Value(s) to add
true if something new was added
Adds event listener.
Events
Event name
Event handler
Clears set
ProtectedfireFire event
Type of event
Arguments for event
Remove event listener
Returns an array of values
Iterate over values
for (let value of set.values()) {
// use value...
}
A Set which stores unique items determined by their value, rather than object reference (unlike the default JS Set). Create with Sets.mutable. Mutable.
By default the
JSON.stringify()representation is considered the 'key' for an object. Pass in a function toSets.mutableto define your own way of creating keys for values. The principle should be that objects that you consider identical should have the same string key value.ISetMutable fires
add,clearanddeleteevents.Example: Overview of functions
Example: Example usage
Example
Events