-
Notifications
You must be signed in to change notification settings - Fork 374
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 flag to capitalize to lowercase remaining characters #408
Conversation
@@ -129,6 +129,7 @@ $(document).ready(function() { | |||
equal(_('fabio').capitalize(), 'Fabio', 'First letter is upper case'); | |||
equal(_.capitalize('fabio'), 'Fabio', 'First letter is upper case'); | |||
equal(_.capitalize('FOO'), 'FOO', 'Other letters unchanged'); | |||
equal(_.capitalize('FOO', true), 'Foo', 'Other letters are lowercased'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add some more test i.e
equal(_.capitalize('foO', true), 'Foo', 'Other letters are lowercased');
// and maybe some tests with lowercaseRest explicit "false"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks.
Could you squash your commits to one? Would be nice, thanks. |
All of them? Because the Contributing document mentions providing separate commits with tests. |
Yes, I would make one commit it's not really a bug. One commit would be cool. |
Add flag to capitalize to lowercase remaining characters
👍 |
😂 |
This adds a new flag to capitalize that when set to
true
will convert all characters after the first one to lowercase. Example: