-
Notifications
You must be signed in to change notification settings - Fork 17
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
toTitleCase
is removing full stops .
#35
Comments
Same log with |
I would expect all punctuation to be removed toTitleCase('my-kebab-case') // 'My Kebab Case'
toTitleCase('my_snake_case') // 'My Snake Case'
toTitleCase('my.path.case') // 'My Path Case' However, I definitely think we could include specific examples in the documentation to make this clear. As a user, I could see myself being surprised by this behavior as well. |
After trying a few different inputs, I do see this though: toTitleCase('my.path.case[0]'); // "My Path Case [ 0 ]"
/*
// lodash example
_.startCase('my.path.case[0]') // "My Path Case 0"
*/ In this case, I would also expect |
Even though the goal is not to have the same behavior as lodash I agree we should fix this... could you create another issue for it? As for this issue, let's make it clearer in the docs. Let's check out what lodash does since we are talking about it: ## lowerCase
Converts string, as space separated words, to lower case.
## toLower
Converts string, as a whole, to lower case just like [String#toLowerCase](https://mdn.io/toLowerCase). I thing we should name the methods differently for v2, and implement |
@jly36963 maybe we should add That should make our library a lil more similar to what people are used to. |
Wow, clocked off for the day to come back to a totally explained and resolved issue. Thank you @gustavoguichard @jly36963! |
console.log(toTitleCase('hello there old friend...'))
Maybe intentional? Not sure :)
The text was updated successfully, but these errors were encountered: