kjelsrud.dev/node_modules/titleize/readme.md

26 lines
393 B
Markdown
Raw Normal View History

2023-07-19 21:31:30 +02:00
# 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