Bump to v3.1.0.

This commit is contained in:
jdalton
2015-02-01 22:09:14 -08:00
parent 891d0482c6
commit d5f4043617
21 changed files with 74 additions and 37 deletions

28
string/startCase.js Normal file
View File

@@ -0,0 +1,28 @@
import createCompounder from '../internal/createCompounder';
/**
* Converts `string` to start case.
* See [Wikipedia](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage)
* for more details.
*
* @static
* @memberOf _
* @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 ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
});
export default startCase;