basant307/AI_Governance_Project
045
1import createCompounder from './_createCompounder.js';2import upperFirst from './upperFirst.js';3 4/**5 * Converts `string` to6 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).7 *8 * @static9 * @memberOf _10 * @since 3.1.011 * @category String12 * @param {string} [string=''] The string to convert.13 * @returns {string} Returns the start cased string.14 * @example15 *16 * _.startCase('--foo-bar--');17 * // => 'Foo Bar'18 *19 * _.startCase('fooBar');20 * // => 'Foo Bar'21 *22 * _.startCase('__FOO_BAR__');23 * // => 'FOO BAR'24 */25var startCase = createCompounder(function(result, word, index) {26 return result + (index ? ' ' : '') + upperFirst(word);27});28 29export default startCase;30 