domchristie / humps

🐫 Underscore-to-camelCase converter (and vice versa) for strings and object keys in JavaScript.
1.42k stars 100 forks source link

Exclude from camelization all-uppercase keys #20

Closed GiovanniFrigo closed 8 years ago

GiovanniFrigo commented 8 years ago

I do believe that all-uppercase keys should not be camelized, as they probably are acronyms.

Think for example to keys like "ID" or "UUID": if camelized, they do became "iD" and "uUID" respectively.

CompuIves commented 8 years ago

Came here to make exactly the same PR, I have this problem currently with currency codes which are wrongly converted (EUR -> eUR).

calvn commented 8 years ago

What is the status on this PR? I mentioned this issue on #24, and I am fine with not camelizing acronyms at all. Is there a suggested workaround for this in the meantime?

GiovanniFrigo commented 8 years ago

Author has not yet responded/reviewed this PR, I don't know if he's still active or not. Meanwhile, you can use the library I forked and patched at GiovanniFrigo/humps

domchristie commented 8 years ago

Hi All,

Thanks for your interest, and apologies for the delay. For the last couple of months I have been spending my time sorting out my new flat so my free time has been limited.

I’ll respond properly when I can.

Thanks again.

domchristie commented 8 years ago

Thanks for this. I believe this can now be closed as a result of #28. Thanks again.