Replace object keys with String.prototype.replace
Install
$ npm install --save key-replace
Usage
const keyReplace = ;const obj = foo: 'bar'; ;//=> {yo: 'bar'} ;//=> {FOo: bar}
API
keyReplace(input, search, replace)
Returns a new object.
input
Required
Type: object
The object which keys will be replaced.
search
Required
Type: string
or regexp
Search for mathching substring that will be replaced.
replace
Required
Type: string
or function
Replacing the mathing substring.
License
MIT © Andreas Gillström