xdash / capitalize
Function: capitalize()
capitalize(
str
):string
Capitalizes the first letter of a string
Parameters
• str: string
string to capitalize
Returns
string
the string with the first letter capitalized
Example
capitalize('foo') // returns 'Foo'
capitalize('FOO') // returns 'FOO'
capitalize('123') // returns '123'
capitalize('') // returns ''