MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / capitalize

Function capitalize

lib/web/jshint.js:11600–11603  ·  view source on GitHub ↗

* Capitalizes the first character of `string`. * * @static * @memberOf _ * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string. * @example * * _.capitalize('fred'); * // => 'Fred

(string)

Source from the content-addressed store, hash-verified

11598 * // => 'Fred'
11599 */
11600 function capitalize(string) {
11601 string = baseToString(string);
11602 return string && (string.charAt(0).toUpperCase() + string.slice(1));
11603 }
11604
11605 /**
11606 * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)

Callers

nothing calls this directly

Calls 1

baseToStringFunction · 0.85

Tested by

no test coverage detected