Function capitalize

  • Converts the first character of string to upper case and the remaining to lower case.

    Parameters

    • s: string

      The string to capitalize.

    Returns string

    Returns the capitalized string.

    Since

    5.3.0

    Example

    capitalize('FRED')
    // => 'Fred'