Capitalize every word in a string:
unicorn cake
→Unicorn Cake
npm install titleize
import titleize from 'titleize';
titleize('foo bar');
//=> 'Foo Bar'
titleize('foo-bar');
//=> 'Foo-Bar'
- camelcase - Convert a dash/dot/underscore/space separated string to camelcase