Sha256: 108cd495196f72d90a5fd94044456cf5a2761f0516923bdeb76740d00db42d22
Contents?: true
Size: 714 Bytes
Versions: 303
Compression:
Stored size: 714 Bytes
Contents
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;
Version data entries
303 entries across 279 versions & 33 rubygems