esamattis / esamattis/underscore.string
titleize unexpected behavior with non-whitespace separators (underscores, dashes)
Open
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
I was expecting titleize to work like Rails titleize, for example:
```
1.9.3p194 :003 > "foo-bar".titleize
=> "Foo Bar"
1.9.3p194 :004 > "foo_bar".titleize
=> "Foo Bar"
```
But in this library, the separator character is retained:
```
_.titleize('foo_bar')
"Foo_bar"
_.titleize('foo-bar')
"Foo-bar"
```
Contributor guide
Assessment
This issue has not been assessed yet.