deep-rename-keys
Recursively rename the keys in an object.
Install with npm
npm i deep-rename-keys --save
Usage
var renameKeys = require('deep-rename-keys');
var obj = rename({a: {a: {a: 'b'}}}, function(key) {
if (key === 'a') return 'zzz';
return key;
});
//=> {zzz: {zzz: {zzz: 'b'}}}
Run tests
Install dev dependencies:
npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on January 20, 2015.