const mapOfStrings = new Map();
mapOfStrings.set(`a`, `10`);
mapOfStrings.get(`a`); // Yields `10` (a string)
// Convert a map of string->string to string->number
const mapOfInts = transformMap(mapOfStrings, (value, key) => parseInt(value));
mapOfInts.get(`a`); // Yields 10 (a proper number)
If you want to combine values into a single object, consider instead mapToObjectTransform.
Like
Array.map
, but for a Map. Transforms from Map<K,V> to Map<K,R>, returning as a new Map.