Transforms own properties of an object using a mapping function.
(Object 'a, ((String, 'a)) => (String, 'b)) => Object 'b
Transforms own properties of an object using a mapping function.
This function is a specialised form of mapEntries
that overwrites
duplicated keys when a collision happens.
Because this function takes an object and maps over it, the result of a transformation where keys collide is not defined in ECMAScript 5 and older, as those engines don't define an ordering for key/value pairs in objects. In ECMAScript 2015 properties that were inserted later will win over properties that were inserted earlier.
(object, transform) =>
mapEntries(object, transform, (result, key, value) => {
result[key] = value;
return result;
})