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

Title case to sentence case? #350

Open
ahamelers opened this issue Oct 19, 2024 · 1 comment
Open

Title case to sentence case? #350

ahamelers opened this issue Oct 19, 2024 · 1 comment

Comments

@ahamelers
Copy link

I am looking for a package to intelligently transform sentences from title case to sentence case. I thought the title-case package would do it, but when I do this on a title cased string:

titleCase(string, {locale: 'en-US', sentenceCase: true})

It leaves the sentence exactly the same. Am I doing something wrong, or is this just not the package for me?

@richardhosler
Copy link

richardhosler commented Nov 20, 2024

@ahamelers
I think the 'titleCase' function changes to title case, not from.

The 'sentenceCase' function in the 'changeCase' package is the one you want.

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

2 participants