getMap()function
getMap(input: PossibleStringMap<K, T>): ImmutableMap<K, T>
getMap(input: PossibleMap<K, T>): ImmutableMap<K, T>
| Param | Type | |
|---|---|---|
input | PossibleStringMap<K, T> | The map, object, or iterable of entries to convert. required |
input | PossibleMap<K, T> | Things that can be converted to maps. required |
| Return | |
|---|---|
ImmutableMap<K, T> | |
ImmutableMap<K, T> | Map that cannot be changed. |
Convert an iterable to a Map (if it's already a Map it passes through unchanged).
Examples
getMap({ a: 1, b: 2 }) // Map { "a" => 1, "b" => 2 }