sindresorhus / camelcase-keys

Convert object keys to camel case
MIT License
691 stars 95 forks source link

Feature request: reverse transformation #70

Open codekiln opened 3 years ago

codekiln commented 3 years ago

I'd prefer to use camelcase-keys as a one-stop library for converting a snake case API result into camelcase for client side JS, and then converting client side JS camelcase back into snake case for sending back to the same API.

Other libraries like decamelize-keys and snakecase-keys exist, but from a library consumer's perspective it would be preferable to have symmetrical transformations in a single library.

Please consider adding this use case to the supported feature set.

sindresorhus commented 3 years ago

I'm open to it. What would the API look like?

sindresorhus commented 2 years ago

I decided to make it a separate package for now: https://github.com/sindresorhus/decamelize-keys

I may move it into this package in the future.