basant307/AI_Governance_Project
048
1import toString from './toString.js';2import upperFirst from './upperFirst.js';3 4/**5 * Converts the first character of `string` to upper case and the remaining6 * to lower case.7 *8 * @static9 * @memberOf _10 * @since 3.0.011 * @category String12 * @param {string} [string=''] The string to capitalize.13 * @returns {string} Returns the capitalized string.14 * @example15 *16 * _.capitalize('FRED');17 * // => 'Fred'18 */19function capitalize(string) {20 return upperFirst(toString(string).toLowerCase());21}22 23export default capitalize;24 