getPreviousMapEntry
getPreviousMapEntry<
K
,V
>(map
,currentKey
):undefined
| [K
,V
]
Defined in: utils/map.ts:8
Returns the map entry that comes before the entry with the provided key. If the provided key is the first entry in the map or doesn’t exist in the map, the function returns undefined.
Type Parameters
Section titled “Type Parameters”K
= any
V
= any
Parameters
Section titled “Parameters”Map
<K
, V
>
The map to search in.
currentKey
Section titled “currentKey”any
The key of the map entry that comes after the desired entry.
Returns
Section titled “Returns”undefined
| [K
, V
]
The map entry that comes before the entry with the provided key, or undefined if such an entry doesn’t exist.