Transform the values of the input object using the mapper and return the mapped object. The returned object will be the same as the input if inPlace is truthy.
inPlace
Optional
import { mapValues } from 'deleight/object/operations'const obj = mapValues({ a: 1, b: 2, c: 3 }, (obj, key) => obj[key] * 3); console.log(obj) // { a: 3, b: 6, c: 9 } Copy
import { mapValues } from 'deleight/object/operations'const obj = mapValues({ a: 1, b: 2, c: 3 }, (obj, key) => obj[key] * 3); console.log(obj) // { a: 3, b: 6, c: 9 }
Transform the values of the input object using the mapper and return the mapped object. The returned object will be the same as the input if
inPlace
is truthy.