Readonly
[toReadonly
sizeStatic
Readonly
[species]Returns if this [[Collection
]] is empty or not
Returns an iterable of entries in the map.
Computes a value if it's absent in this Collection
The key to find
Item to add when it doesn't exist
Returns an iterable of key, value pairs for every entry in the map.
Use a predicate function to filter out anything and return a new Array
A new Array of the values that returned true
in the predicate function
The predicate function to filter out
Optional
thisArg: ThisArgAn additional this
context if needed
Use a predicate function to filter out keys and return a new Array of the keys
that resolved true in the predicate function. Use Collection#filter to filter out
any values from this [[Collection
]].
A new Array of the values that returned true
in the predicate function
The predicate function to filter out
Optional
thisArg: ThisArgAn additional this
context if needed
Find a value in the collection from it's predicate function
The value found or null
if not found
The predicate function
Optional
thisArg: ThisArgAn additional this
context if needed
Finds a key in the collection from it's predicate function
The key found or null
if not found
The predicate function
Optional
thisArg: ThisArgAn additional this
context if needed
Returns the first element in the collection
Returns an Array of the values from the correspondant amount
The amount to fetch from
Optional
thisArg: anyReturns the last element in the collection
Returns an Array of the values from the correspondant amount
The amount to fetch from
Use a predicate function to map anything into a new array
A new Array of the values from that function
The predicate function to map out and return a new array
Optional
thisArg: ThisArgAn additional this
context if needed
Returns a random value from the collection
A random value or null
if the collection is empty
Reduce the collection and return a new initial value
The predicate function
Optional
initialValue: SThe initial value
Gets the first item in the collection and removes it (if provided)
Optional
remove: booleanIf we should remove it or not
Similar to [Array.some], this function tests whether atleast 1 item in the predicate function passes the test in the values cache.
A boolean value if 1 item of the cache is truthy
The function to use to filter out
Similar to [Array.some], this functions tests whether atleast 1 key in the predicate function passes the test in the key cache.
A boolean value if 1 item of the cache is truthy
The function to use to filter out
Similar to [Array.sort], which basically sorts the values of this Collection to return a value
The value
The compare function
Similar to [Array.sort], which basically sorts the values of this Collection to return a value
The value
The compare function
Returns all of the values as an Array
Gets the last item in the collection and removes it(if provided)
If we should remove it or not
Returns an iterable of values in the map
Represents a class to hold key-value pairs using Collection. This is a extension of [Map] to add Array-like functions and a update builder.