source: imaps-frontend/node_modules/lodash-es/camelCase.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 699 bytes
RevLine 
[d565449]1import capitalize from './capitalize.js';
2import createCompounder from './_createCompounder.js';
3
4/**
5 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
6 *
7 * @static
8 * @memberOf _
9 * @since 3.0.0
10 * @category String
11 * @param {string} [string=''] The string to convert.
12 * @returns {string} Returns the camel cased string.
13 * @example
14 *
15 * _.camelCase('Foo Bar');
16 * // => 'fooBar'
17 *
18 * _.camelCase('--foo-bar--');
19 * // => 'fooBar'
20 *
21 * _.camelCase('__FOO_BAR__');
22 * // => 'fooBar'
23 */
24var camelCase = createCompounder(function(result, word, index) {
25 word = word.toLowerCase();
26 return result + (index ? capitalize(word) : word);
27});
28
29export default camelCase;
Note: See TracBrowser for help on using the repository browser.