18 lines
301 B
TypeScript
18 lines
301 B
TypeScript
/**
|
|
Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`.
|
|
|
|
@param string - The string to titleize.
|
|
|
|
@example
|
|
```
|
|
import titleize from 'titleize';
|
|
|
|
titleize('foo bar');
|
|
//=> 'Foo Bar'
|
|
|
|
titleize('foo-bar');
|
|
//=> 'Foo-Bar'
|
|
```
|
|
*/
|
|
export default function titleize(string: string): string;
|