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

Wrong value for camelize and decamelize when using 1 or 2 characters key #297

Open
ThmX opened this issue Jan 11, 2024 · 0 comments
Open

Comments

@ThmX
Copy link

ThmX commented Jan 11, 2024

Describe the bug
When using a key with only 2 characters, the value is not camelized nor decamelized correctly.

To Reproduce

assert humps.camelize("j1") == "J1"
assert humps.decamelize("J1") == "j1"

assert humps.camelize("x") == "X"
assert humps.decamelize("X") == "x"

Expected behavior

  • camelize should return J1 but got j1 instead.

  • decamelize should return j1 but got J1 instead.

  • camelize should return X but got x instead.

  • decamelize should return x but got X instead.

Desktop (please complete the following information):

  • OS: Macos
  • Browser None
  • Version 3.8.0

Additional context
#61 and #168

@ThmX ThmX changed the title Wrong value for camelize and decamelize when using 2 characters key Wrong value for camelize and decamelize when using 1 or 2 characters key Jan 11, 2024
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

1 participant