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: Kebab Case #41

Closed
Ilyes512 opened this issue Sep 5, 2018 · 2 comments
Closed

Feature: Kebab Case #41

Ilyes512 opened this issue Sep 5, 2018 · 2 comments

Comments

@Ilyes512
Copy link

Ilyes512 commented Sep 5, 2018

A KebabCase functions. I think it should behave exactly like snakecase accept that _ becomes -.

It's also requested on Masterminds/sprig#113.

@Ilyes512 Ilyes512 changed the title [Feature request] KebabCase functions [Feature request] Kebab Case function Sep 5, 2018
@huandu huandu changed the title [Feature request] Kebab Case function Feature: Kebab Case Sep 6, 2018
@huandu
Copy link
Owner

huandu commented Sep 6, 2018

The rule of transform camel case to kebab case is the same as the rule described in #1 camel case to snake case.

  • SomeWords => some-words
  • HTTPServer => http-server
  • NoHTTPS => no-https
  • HTTP2XX => http-2xx
  • http2xx => http-2xx
  • HTTP20xOK => http-20x-ok

@huandu huandu closed this as completed in f02667b Sep 6, 2018
@Ilyes512
Copy link
Author

Ilyes512 commented Sep 6, 2018

Awesome and thanks! That was fast :)

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