$ npm install @gooby/keys
import keys from '@gooby/keys';
// Simple object
keys.toCamel({my_key: null}); // {myKey: null}
keys.toSnake({myKey: null}); // {my_key: null}
// Nested objects
keys.toCamel({my_key: {my_key: null}}); // {myKey: {myKey: null}}
keys.toSnake({myKey: {myKey: null}}); // {my_key: {my_key: null}}
You can also pass in an array of simple or nested objects.
Type: object | object[]
Type: object | object[]