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

Support for Kebab case? #218

Closed
4 of 5 tasks
ificiana opened this issue Oct 14, 2021 · 6 comments · Fixed by #272
Closed
4 of 5 tasks

Support for Kebab case? #218

ificiana opened this issue Oct 14, 2021 · 6 comments · Fixed by #272

Comments

@ificiana
Copy link
Contributor

ificiana commented Oct 14, 2021

Is your feature request related to a problem? Please describe.
#180 #151

Describe the solution you'd like
Discussion: Should we add support for Kebab case?

  • kebabize
  • dekebabize
  • is_kebabcase
  • type hints
  • test cases

Describe alternatives you've considered

Additional context

@ronnie-llamado
Copy link
Contributor

This seems easy enough to support; it's appears to be snakecase with hyphens instead of underscores. I can't see why not.

@ificiana
Copy link
Contributor Author

ificiana commented Oct 21, 2021

Yeah I wondered the same, I have a draft PR ready for that (can push in 2 weeks perhaps) but I was also wondering why it wasn't included originally. So I brought up this discussion...
anyway, gonna work on this
I too can't see why not to have this feature

@ronnie-llamado
Copy link
Contributor

That'd be a question for the original repository that this package inspired by: https://github.com/domchristie/humps.

Sounds good, look forward to your PR!

@ificiana
Copy link
Contributor Author

@ronnie-llamado I need a bit of help with the test cases, is there a standard source I can refer to for the expected outputs?
for example, API-Response vs api-response vs API-response etc.
also whether to keep leading and trailing _ in kebab-case: _fallback-url__ vs fallback-url etc.

@ronnie-llamado
Copy link
Contributor

I don't think there's a standard source to reference for this.

In regards to upper- vs lowercase:
Just from searching around, it appears it is most often defaulted to lowercase (just like snakecase). I can't say for certain though.

In regards to underscores:
I'd imagine underscores do not need to be tested. All other cases would be valid python variables, but kebab-case will not be since dashes are not a valid character inside a variable/method/function name.

@ificiana ificiana removed their assignment Nov 27, 2021
@ificiana
Copy link
Contributor Author

ificiana commented Nov 27, 2021

Unassigning myself... not getting enough time
If anyone wants to contribute in this issue, feel free to

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