Converts a given string to Header-Case (also known as Title Case with spaces).
The input string to convert.
The Header-Case version of the input string, or an empty string if input is falsy.
toHeaderCase('helloWorld'); // "Hello World"toHeaderCase('foo_bar-baz'); // "Foo Bar Baz"toHeaderCase(' someInputValue'); // "Some Input Value"toHeaderCase(undefined); // "" Copy
toHeaderCase('helloWorld'); // "Hello World"toHeaderCase('foo_bar-baz'); // "Foo Bar Baz"toHeaderCase(' someInputValue'); // "Some Input Value"toHeaderCase(undefined); // ""
Converts a given string to Header-Case (also known as Title Case with spaces).