Renames keys in src
using mapping provided by key map km
. Does support key swapping / swizzling. Does not modify original.
// swap a & b, rename c
renameKeysObj({a: 1, b: 2, c: 3}, {a: "b", b: "a", c: "cc"})
// {b: 1, a: 2, cc: 3}
source object
key mappings
result object
Generated using TypeDoc
Renames keys in
src
using mapping provided by key mapkm
. Does support key swapping / swizzling. Does not modify original.