humps icon indicating copy to clipboard operation
humps copied to clipboard

🐫 Underscore-to-camelCase converter (and vice versa) for strings and object keys in JavaScript.

Results 27 humps issues
Sort by recently updated
recently updated
newest added

Hi, I have a problem, when i send a multipart-form request with axios, humps transform request into json and rails returns 422. How can i resolve this? Thanks for help!

`decamelize` and `camelize` must be reverse operations This is not correct for: ``` humps.decamelize(humps.camelize('is_age_18'))) // is_age_18 !== is_age18 ```

when i try to camelize my object, i want to convert one of the field (string) into moment object, like this ``` const p = camelizeKeys({ ...myobject, timestamp: moment(purchase.timestamp), });...

I was having an issue where an Array was being turned into an Object when using humps.camelizeKeys() We are currently running on a prototypes.js version 1.5. Anything lower then 1.7.3...

I suggest that let the recursion or deep as an option. Sometimes I don't want to convert nested keys, only outside keys.

something like this: ``` import { depascalizeKeys } from 'humps' class SomeClass { someMethod(obj) { return depascalizeKeys(obj) } } const instance = new SomeClass() instance.someMethod({KeyName: 'value'}) ``` will throw: `TypeError:...

Before: ![image](https://user-images.githubusercontent.com/3068563/35191175-30378412-fe5b-11e7-8619-17fb486f4792.png) After: ![image](https://user-images.githubusercontent.com/3068563/35191176-40a2d342-fe5b-11e7-8ac2-e57ffea302a2.png)

Makes the license clear and easy to find.

When running an object that contains keys with functions as values through camelizeKeys, the functions are converted into empty objects.