getMapItem()function
getMapItem(map: ImmutableMap<K, T>, key: K): T | undefined
| Param | Type | |
|---|---|---|
map | ImmutableMap<K, T> | The map to read from. required |
key | K | The key to look up. required |
| Return | |
|---|---|
T | undefined | The value for key, or undefined if it doesn't exist. |
Get an item in a map, or undefined if it doesn't exist.
Examples
getMapItem(new Map([["a", 1]]), "a") // 1