Function capitalize

  • It will convert the first character of the string to uppercase and the remaining to lowercase.

    Type Parameters

    • Value extends string

    Parameters

    Returns Capitalize<Lowercase<Value>>

    Since

    1.0.0

    Example

    capitalize('fred');
    // => 'Fred'

    Example

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

    Example

    capitalize('frED');
    // => 'Fred'