Transform works like reduce, except the accumulator is implicitly returned
object
(object): input objectfunc
(function): iteratee function[accumulator={}]
(Array|object): custom accumulator object
(*): returns accumulator object after the input object has been iterated over by the function.
const result = objects.transform({ harmony: 2, daft: 4, stripes: 6 }, function(acc, val, key) {
acc[key] = val + 5 + '_' + idx;
});
console.log(result);
> { harmony: '7_0', daft: '9_1', stripes: '11_2' }