esamattis / esamattis/underscore.string

titleize unexpected behavior with non-whitespace separators (underscores, dashes)

Open
#184 9 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.