26 lines
393 B
Markdown
26 lines
393 B
Markdown
![]() |
# titleize
|
||
|
|
||
|
> Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`
|
||
|
|
||
|
## Install
|
||
|
|
||
|
```
|
||
|
$ npm install titleize
|
||
|
```
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
```js
|
||
|
import titleize from 'titleize';
|
||
|
|
||
|
titleize('foo bar');
|
||
|
//=> 'Foo Bar'
|
||
|
|
||
|
titleize('foo-bar');
|
||
|
//=> 'Foo-Bar'
|
||
|
```
|
||
|
|
||
|
## Related
|
||
|
|
||
|
- [camelcase](https://github.com/sindresorhus/camelcase) - Convert a dash/dot/underscore/space separated string to camelcase
|