-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Add TitleCase and Titleize #303
Conversation
It's cool that you managed to implement APA style titleization, but are there any realistic use-cases for that? The contention in the issue was really the naming, not whether or not to add APA style titleization. |
@sindresorhus I think the use case is the same. It will be for data display. I would think it would depend on the data you are displaying. For example, if you had book titles as keys in a hashmap structure in any of the other types of casing, you could type the conversion back to APA format. Otherwise the first one would work fine. I did also make the Title Case option extendable so, it could be configured to skip certain words if desired. Either way, just let me know if you like it, or would like something changed and I can make the changes. |
Since there's no standard for title case, if we decide to keep it, it should be named |
So it seems like a common naming for the case when you uppercase the first characters in each word is commonly known as "StartCase", "CapitalizedCase", or "Capitalize". https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage |
@voxpelli @jonahsnider Any opinions whether to keep |
@sindresorhus I'm myself getting a bit hesitant in adding too many of these capitalization helpers to Especially exotic ones like We have Camel, Kebab, Pascal and Snake – those are the four most common – and we have two additional helpers for each, Especially when seeing the complexity that some of these add, like eg. #326 |
After thinking about this for a while, I agree, it's a bit obscure. I have often needed camel-case conversion, etc. But never title case. I recommend publishing this as a separate package and I'd be happy to link to it from the type-fest readme ;) |
nvm, looking at the code this is different than |
#299 TitleCase
Adds TitleCase and Titleize types: