@spa-tools/utilities
capitalizeFirstWord()
The capitalizeFirstWord()
function does just what is says :-).
Usage
import { capitalizeFirstWord } from '@spa-tools/utilities';
const result = capitalizeFirstWord('hello world');
console.log(result);
// --> Hello world
Arguments
Name | Type | Description |
---|---|---|
str | string | The string to capitalize first word for |
Returns
Returns string
.