titleize
v4.0.0
Published
Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`
Downloads
13,038,952
Maintainers
Readme
titleize
Capitalize every word in a string:
unicorn cake
→Unicorn Cake
Install
npm install titleize
Usage
import titleize from 'titleize';
titleize('foo bar');
//=> 'Foo Bar'
titleize('foo-bar');
//=> 'Foo-Bar'
Related
- camelcase - Convert a dash/dot/underscore/space separated string to camelcase