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

camelcaseKey ObjectId 5eaabe10cd5bca719652179d transform to 5Eaabe10Cd5Bca719652179D #85

Open
Innei opened this issue Jan 31, 2022 · 2 comments

Comments

@Innei
Copy link

Innei commented Jan 31, 2022

Why transform key uppercase some char, but not all upper cased.

camelcaseKeys({
 '5eaabe10cd5bca719652179d': {
        status: 200,
        id: '5eaabe10cd5bca719652179d',
      },} {deep: true})

// 

image

@sindresorhus
Copy link
Owner

I think this is a case of sindresorhus/camelcase#77.

But you should be excluding properties that are not meant to be camelcase anyway.

@Innei
Copy link
Author

Innei commented Jan 31, 2022

I think this is a case of sindresorhus/camelcase#77.

But you should be excluding properties that are not meant to be camelcase anyway.

I convert case in axios interceptor, and this payload is an objectId-value object, how I can exclude all ids. Anyway, exclude key in interceptor is a bad idea.

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

No branches or pull requests

2 participants