Optional
entries: null | readonly (readonly [K, V])[]Optional
iterable: null | Iterable<readonly [K, V]>Readonly
[toStatic
Readonly
[species]The number of elements in the map. Derived from Map#size.
Returns the element of the element at an index of the map. Similar to Array#at().
The index of the element.
The found element, or undefined
if no element matches the index.
Removes all elements from the map.
Derived from the Map#clear() method, however this
is returned instead of void
.
The map.
Creates a shallow clone of the map.
The clone of the map.
Merges the map with one or more other maps, or a key / value pair. Similar to Array#concat().
Rest
...maps: (Map<K, V> | [K, V])[]The maps to merge.
The merged map.
Removes a specified element from the map. Derived from the Map#delete() method.
The key of the element to remove.
If the element was removed, false if it does not exist.
Returns a new iterator object that contains key value pairs for each element in the map. Derived from the Map#entries() method.
The new iterator object.
Tests if all elements in the map satisfy a test specified in the callback. Similar to Array#every().
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
true
if all elements pass the callback test, false
otherwise.
Sets every element of the map to the specified value. Similar to Array#fill().
The value to set all elements of the map to.
The map.
Creates a new map with all elements that pass a test specified in the callback. Similar to Array#filter().
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
A map with elements that passed the provided test.
Returns the first element in the map that satisfies the provided test. Similar to Array#find().
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
The first element that satisfies the test. If no element is found, undefined
is returned.
Returns the first key in the map that satisfies the provided test. Similar to Array#findIndex().
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
The first key that satisfies the test. If no element is found, undefined
is returned.
Returns a new map created by applying a specified callback function to each element of the map, then flattening the result by 1 level.
Identical to ExtendedMap#map()
followed by flattening by a depth of 1.
Similar to Array#flatMap().
A function to apply to every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
The new map.
Executes the provided function once for each element in the map.
Derived from the Map#forEach() method, however this
is returned instead of void
.
The function to execute for each element in the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
The map.
Returns a specified element from the map. Derived from the Map#get() method.
The key of the element.
The element with the specified key, or undefined
if no element matches the key.
Checks if the map has an element with the specified key. Derived from the Map#has() method.
The key to test.
true
if an element is found, false
otherwise.
Returns a new iterator object that contains keys for each element in the map. Derived from the Map#keys() method.
The new iterator object.
Creates an array filled with the results from calling a specified callback function on each element of the map. Similar to Array#map().
A function to apply to every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
The array.
Executes a specified reducer callback function on each element of the map to produce a single value. Similar to Array#reduce().
A reducer function to apply to every element of the map.
Optional
initialValue: TA value to initialize previousValue
in the callback function with.
The result of the reducer.
Adds or modifies an element with the specified key. Derived from the Map#set() method.
The key of the element to add / modify.
The new value of the specified element.
The map.
Tests if any element in the map satisfies a test specified in the callback. Similar to Array#some().
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
true
if a single element passes the callback test, false
otherwise.
Removes all elements in the map that satisfy a specified test.
A function to test every element of the map.
Optional
thisArg: anyA value to use as this
when executing callbackfn
.
A map containing the removed elements.
Returns a new iterator object that contains values for each element in the map. Derived from the Map#values() method.
The new iterator object.
Static
isDetermines if a value is an extended map.
The value to test.
Static
isGenerated using TypeDoc
A Map with additional methods. Similar to that of discord.js's collection