1 var createCompounder = require('../internal/createCompounder');
4 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
9 * @param {string} [string=''] The string to convert.
10 * @returns {string} Returns the camel cased string.
13 * _.camelCase('Foo Bar');
16 * _.camelCase('--foo-bar');
19 * _.camelCase('__foo_bar__');
22 var camelCase = createCompounder(function(result, word, index) {
23 word = word.toLowerCase();
24 return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
27 module.exports = camelCase;