Urara-Blog/node_modules/.pnpm-store/v3/files/1b/01984a413823ed538347b12d4bc9498b58f7ae56b78b91ccd85e7062dbbc49bdc77d158ac78847522626358797e576153c6c4c99ee95e925cfcbdb08d91696
2022-08-14 01:14:53 +08:00

29 lines
714 B
Text

var createCompounder = require('./_createCompounder'),
upperFirst = require('./upperFirst');
/**
* Converts `string` to
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
*
* @static
* @memberOf _
* @since 3.1.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the start cased string.
* @example
*
* _.startCase('--foo-bar--');
* // => 'Foo Bar'
*
* _.startCase('fooBar');
* // => 'Foo Bar'
*
* _.startCase('__FOO_BAR__');
* // => 'FOO BAR'
*/
var startCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + upperFirst(word);
});
module.exports = startCase;