An ordered list of values.
An ordered collection of values with fast random access, push, pop, shift, and unshift, but slow to splice.
A map of [key, value] entries, where keys may be arbitrary values including objects.
A collection of unique values.
A collection of values with the largest always on top.
A mapping from string keys to values.
A collection of values stored in stable stored order, backed by an array.
The backing store for Set
and FastMap
.
A set with a maximum capacity that will evict the least recently used value.
A set with a maximum capacity that will evict the least frequently used value.
A collection of unique values stored in sorted order, backed by a plain array.
A collection of values stored in sorted order using a binary tree.
The backing store for a Map
.
A map with a maximum capacity that will evict the least frequently used entry.
A map with a maximum capacity that will evict the least recently used entry.
A map from keys to buckets, typically arrays.
A map with entries sorted by key.
A map of key value pairs, sorted by key, backed by an array.
A map of object keys to values with good garbage collection behavior. See WeakMap.
Produces values in order on demand.
An ordered collection of values with fast random access, push(...values)
, and pop()
, but can be slow to splice when sufficiently massive.
The native JavaScript object, with some additional constructor methods shimmed.
An abstract collection that implements many generic methods, reusable by most collections.
An abstract collection that implements generic methods that can be used by any collection that keeps its values in a meaningful order.
An abstract collection that implements many generic methods, reusable by most sets.
An abstract collection that implements many generic methods, reusable by most maps.
A prototype that provides the interface for listening to and dispatching synchronous property change notifications.
An abstract collection that provides the interface for listening to and dispatching notifications when values are removed then added at an index.
An abstract collection that provides the interface for listening to and dispatching notifications when the value for a key changes and when entries are added or removed.
The number of items in this collection.
Adds values to the end of a collection.
Removes a value from the end of a collection, and returns that value.
Removes a value from the beginning of a collection, and returns that value.
Adds values to the beginning of a collection.
Returns the value at the beginning of a collection, the value that would be returned by shift()
.
Replaces the value at the beginning of a collection, the value that would be returned by shift()
.
Returns the value at the end of a collection, the value that would be returned by pop()
.
Replaces the value at the end of a collection, the value that would be returned by pop()
.
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.
Whether an equivalent value exists in this collection.
Returns whether an equivalent value exists in this collection.
Retrieves the equivalent value from the collection.
Retrieves the equivalent value from this collection.
Adds a value to a collection.
Deletes the first equivalent value. Returns whether the key was found and successfully deleted.
Seeks out and deletes an equivalent value. Returns whether the value was found and successfully deleted.
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.
Returns whether an entry with the given key exists in a Map
.
Gets the value for a key in a map.
Sets the value for a given key.
Adds a value for a given key to a map.
Deletes the value for a given key. Returns whether the key was found and successfully deleted.
Returns an array of the keys of this map.
Returns an array of the values of this map.
Returns an array of all [key, value] entries for this map.
Copies values or entries from another collection into this collection, and then returns this.
Deletes every value or every value for each key. Returns the number of successful deletions.
Deletes every value equivalent to the given value from the collection.
Returns an array of the values contained in the half-open interval [start, end), that is, including the start and excluding the end.
Replaces a length of values from a starting position with the given variadic values, and returns the values that were replaced as an array.
Replaces a length of values from a starting position with the given values.
Deletes all of the values in the collection.
Returns the position of a value, or -1 if the value is not found.
Returns the last position of a value, or -1 if the value is not found.
Returns the position of a value, or -1 if the value is not found.
Returns the last position of a value, or -1 if the value is not found.
(not implemented) Finds the first value within a collection that passes a test.
(not implemented) Finds the last value within a collection that passes a test, searching from the right.
(not implemented) Finds the first value within a collection that passes a test. Finds the first index within a collection that passes a test.
(not implemented) Finds the last index within a collection that passes a test, searching from the right.
Finds the first equivalent value.
Finds the last equivalent value, searching from the right.
Finds the smallest value, returning the node at which it was found, or undefined.
Finds the smallest value greater than the given value, returning the node at which it was found, or undefined.
Finds the smallest value greater than or equal to the given value, returning the node at which it was found, or undefined.
Finds the largest value, returning the node at which it was found, or undefined.
Finds the largest value less than the given value, returning the node at which it was found, or undefined.
Finds the largest value less than or equal to the given value, returning the node at which it was found, or undefined.
Returns an iterator for the respective return values of a callback for each value from this iteration.
Returns an iterator for all values from this iterator that pass a test.
Returns an iterator that will begin with the first value from this iteration that passes a test.
Returns an iterator that will produce every value from this iteration until an entry fails a test.
Returns an iterator that will produce an array of values with the value at the same index of this iterator and each given iterable.
Creates an iterator that will produce [index, value] for each value in this iterator, on demand.
Iterates every value in this collection.
Iterates from start to end within a collection.
Iterates every value in this collection.
Calls the callback for each entry in the collection.
Returns an array of the respective return values of a callback for each entry in this collection.
Returns an array with each value from this collection that passes the given test.
Aggregates every value in this collection with the result collected up to that index.
Aggregates every value in this collection, from right to left.
Returns an array of [key, class] entries where every value from the collection is placed into the same equivalence class if they return the same key through the given callback.
Returns whether any entry in this collection passes a given test.
Returns whether every entry in this collection passes a given test.
Returns whether any value in the collection is truthy.
Returns whether all values in the collection are truthy.
Returns one, arbitrary value from this collection, or undefined if there are none.
Returns the only value in this collection, or undefined if there is more than one value, or if there are no values in the collection.
Sorts a collection in place.
Returns a sorted array of the values in this collection.
Reverses the order of this collection in place.
Returns a copy of this collection with the values in reverse order.
Returns a string of all the values in the collection delimited by the given string.
Returns an array of all the non-overlapping strings between the given delimiter. The delimiter may be either a string or a regular expression.
Returns the sum of all values in this collection.
Returns the arithmetic mean of the collection, by computing its sum and the count of values and returning the quotient.
Returns the smallest value in this collection.
Returns the largest value in this collection.
Returns an array of the respective values in this collection and in each collection provided as an argument.
Given a collection of collections, returns the respective an array containing the respective values from each inner collection.
unzip
is equivalent to a matrix transpose.
Returns an array of [index, value] entries for each value in this collection, counting all values from the given index.
Returns a new collection of the same type containing all the values of itself and the values of any number of other iterable collections in order.
Assuming that this is a collection of collections, returns a new collection that contains all the values of each nested collection in order.
Returns an array of each value in this collection.
Returns an object with each property name and value corresponding to the entries in this collection.
Used by JSON.stringify
to create a JSON representation of the collection.
Returns whether this collection is equivalent to the given collection.
Compares two values and returns a number having the same relative value to zero.
Consistently returns the same string for the same object.
Creates a deep replica of this collection.
Creates a shallow clone of this collection.
The compare
function used by this collection to determine how to order its own values.
The equals
function used to check whether values in this collection are equivalent.
The hash
function used by this collection to hash its own values.
An internal method of Deque
that will grow the backing store if necessary.
An implementation detail of a Deque
that will increase the size of its backing store.
An internal utility of List
coercing indexes to nodes.
Rotates a splay tree until the value is at the root, or would be between the root and one of its children.
Rotates the tree until the node at a given index floats to the top.
Writes a tree describing the internal state of the sorted set splay tree.
Adds a listener for when values are added or removed at any position.
Unregisters a range change listener provided by addRangeChangeListener.
Informs range change listeners that values were removed then added at an index.
Adds a listener for before values are added or removed at any position.
Unregisters a range change listener provided by addBeforeRangeChangeListener or addRangeChangeListener with the beforeChange
flag.
Informs range change listeners that values will be removed then added at an index.
Adds a listener for when the value for a key changes, or when entries are added or removed.
Adds a listener for before map entries are created, deleted, or updated.
Unregisters a map change listener provided by addMapChangeListener.
Unregisters a map change listener provided by addBeforeMapChangeListener or addMapChangeListener with the beforeChange
flag.
Informs map change listeners that an entry was created, deleted, or updated.
Informs map change listeners that an entry will be created, deleted, or updated.
Adds a listener for an owned property with the given name.
Adds a listener for before a property changes.
Unregisters a property change listener provided by addOwnPropertyChangeListener.
Unregisters a property change listener provided by addBeforeOwnPropertyChangeListener or addOwnPropertyChangeListener with the beforeChange
flag.
Informs property change listeners that the value for a property name has changed.
Informs property change listeners that the value for a property name will change.
May perform internal changes necessary to dispatch property changes for a particular name.
Makes changes observable for this collection.