Modify the keys of an object
npm install modify-keys
import modifyKeys from 'modify-keys';
modifyKeys({FOO: true, bAr: false}, (key, value) => key.toLowerCase());
//=> {foo: true, bar: false}
Modifies the keys and returns a new object.
Type: object
Type: Function
Receives the key and value for each item and is expected to return the new key.
See modify-values for modifying the values of an object.