Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep support #1

Open
LinusU opened this issue Apr 7, 2016 · 7 comments
Open

Deep support #1

LinusU opened this issue Apr 7, 2016 · 7 comments

Comments

@LinusU
Copy link

LinusU commented Apr 7, 2016

It would be awesome if we could add a deep option that decamlize keys recursively inside objects and arrays.

e.g.

const input = { aA: [{ bB: 1 }, { cC: 2 }] }
const output = decamelizeKeys(input, '-', { deep: true })

// { 'a-a': [{ 'b-b': 1 }, { 'c-c': 2 }]}
@dsblv
Copy link
Owner

dsblv commented Apr 7, 2016

Sounds cool, but I want to keep this module being an exactly-same-but-reversed copy of camelcase-keys, wthich seems to be intentionally shallow.

I guess you can submit a PR there, and if it's accepted, I'll recreate those changes here.

Sorry for the complications.

@LinusU
Copy link
Author

LinusU commented Apr 7, 2016

No problem, I actually feel the same way. I'll take it up there first, and then we can fix it here...

@rxaviers
Copy link

rxaviers commented Apr 14, 2016

Hi, first of all great work with this library. For the ones who need deep support:
https://github.com/rxaviers/decamelize-keys-deep

@technology-studio-apiary

the original library has been updated, and it supports deep option now. Could you please reflect. Thanks.

@dsblv
Copy link
Owner

dsblv commented May 5, 2017

Would yo like to submit a PR, @technology-studio-apiary ?

@technology-studio-apiary

Actually don't have time at this moment, We have used decamelize-keys-deep.

@sindresorhus
Copy link

The package name was transferred to me (I'm the author of camelcase-keys), so a deep option is now available: https://github.com/sindresorhus/decamelize-keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants