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

Feature request: Support "kebab-case" #197

Open
IndrajeetPatil opened this issue Dec 9, 2023 · 4 comments
Open

Feature request: Support "kebab-case" #197

IndrajeetPatil opened this issue Dec 9, 2023 · 4 comments

Comments

@IndrajeetPatil
Copy link

I have seen this case used often in naming conventions for file names (e.g. test-one-sample-test.R), in addition to naming variables.

Will it be possible for {snakecase} to support this?

@Tazinho
Copy link
Owner

Tazinho commented Dec 9, 2023

Hi @IndrajeetPatil you could use case = „snake“ and sep_out = „-“.

@IndrajeetPatil
Copy link
Author

Thanks for the quick response!

From discoverability perspective, I still think it might be worth it to support case = "kebab", but I will leave that up to you 🙃

@Tazinho
Copy link
Owner

Tazinho commented Dec 10, 2023

I think it‘s a good point you are making. Will do once I come back here.

@JosiahParry
Copy link

Coming here to request the same thing. I needed to convert from lower camel to lower-kebab-case. I was surprised that this was not possible out of the box. I used to_any_case(x, sep_out = "-") which worked just fine. But snakecase is all about being easy to use!

I was surprised that there is not feature parity with heck rust library

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

3 participants