Convert an object's keys to snake case
$ npm install --save snakecase-keys
var snakeCaseKeys = require('snakecase-keys')
snakeCaseKeys({fooBar: 'baz'})
//=> {foo_bar: 'baz'}
snakeCaseKeys({'foo-bar': true, nested: {fooBaz: 'bar'}});
//=> {foo_bar: true, nested: {foo_baz: 'bar'}}
Required
Type: object
An object to transform into snake case (keys only).
MIT © Ben Drucker