• Capitalizes the first letter of a string and converts the rest to lowercase.

    Parameters

    • str: string

      the input string

    Returns string

    the capitalized string

    Example

    capitalize('hello world'); // 'Hello world'
    

Generated using TypeDoc