v5.2.0
added the ability for the mapper function to return an array of key value entires to build the map with custom keys and values. #58
The following example will generate a map with keys that are value * 2 and the mapped value is just the value itself.
arrayToMap([1, 2, 3], (value) => [value * 2, value])