Home

Awesome

titleize

Capitalize every word in a string: unicorn cakeUnicorn Cake

Install

npm install titleize

Usage

import titleize from 'titleize';

titleize('foo bar');
//=> 'Foo Bar'

titleize('foo-bar');
//=> 'Foo-Bar'

Related