capitalize source npm

_.capitalize([string=''])

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

Arguments

  1. [string=''] (string)

    The string to capitalize.

Returns (string)

Returns the capitalized string.

Example

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