Transducer. Similar to {@link (map:1)}, but expects object values and the given function fn is applied to each enumerable property value and the results reassigned to their original keys.
remarks
By default, a shallow copy of the source object is created. The resulting object is then used as the result of this transducer.
Transducer. Similar to {@link (map:1)}, but expects object values and the given function
fn
is applied to each enumerable property value and the results reassigned to their original keys.By default, a shallow copy of the source object is created. The resulting object is then used as the result of this transducer.
[...mapVals((x)=> x * 10, [{a: 1, b: 2}, {c: 3, d: 4}])] // [ { a: 10, b: 20 }, { c: 30, d: 40 } ]