Transform the keys 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 { mapKeys } from 'deleight/object/operations'const obj = mapKeys({ a: 1, b: 2, c: 3 }, (obj, key) => `${key}1`); console.log(obj) // { a1: 1, b1: 2, c1: 3 } Copy
import { mapKeys } from 'deleight/object/operations'const obj = mapKeys({ a: 1, b: 2, c: 3 }, (obj, key) => `${key}1`); console.log(obj) // { a1: 1, b1: 2, c1: 3 }
Transform the keys 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.