MCPcopy
hub / github.com/lodash/lodash / capitalize

Function capitalize

lodash.js:14267–14269  ·  view source on GitHub ↗

* Converts the first character of `string` to upper case and the remaining * to lower case. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string.

(string)

Source from the content-addressed store, hash-verified

14265 * // => 'Fred'
14266 */
14267 function capitalize(string) {
14268 return upperFirst(toString(string).toLowerCase());
14269 }
14270
14271 /**
14272 * Deburrs `string` by converting

Callers 1

lodash.jsFile · 0.85

Calls 1

toStringFunction · 0.85

Tested by

no test coverage detected