Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
camelCase('Foo Bar')
// => 'fooBar'
camelCase('--foo-bar--')
// => 'fooBar'
camelCase('__FOO_BAR__')
// => 'fooBar'
Name | Type | Attribute | Description |
---|---|---|---|
string | The string to convert. |
{ "comment": "/**\r\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\r\n *\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to convert.\r\n * @returns {string} Returns the camel cased string.\r\n * @see lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst\r\n * @example\r\n *\r\n * camelCase('Foo Bar')\r\n * // => 'fooBar'\r\n *\r\n * camelCase('--foo-bar--')\r\n * // => 'fooBar'\r\n *\r\n * camelCase('__FOO_BAR__')\r\n * // => 'fooBar'\r\n */", "meta": { "range": [ 563, 771 ], "filename": "camelCase.js", "lineno": 23, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100000314", "name": "camelCase", "type": "ArrowFunctionExpression" }, "vars": { "": null } }, "description": "Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).", "since": "3.0.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "String", "value": "String" } ], "params": [ { "type": { "names": [ "string" ] }, "optional": true, "defaultvalue": "''", "description": "The string to convert.", "name": "string" } ], "returns": [ { "type": { "names": [ "string" ] }, "description": "Returns the camel cased string." } ], "see": [ "lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst" ], "examples": [ "camelCase('Foo Bar')\r// => 'fooBar'\r\rcamelCase('--foo-bar--')\r// => 'fooBar'\r\rcamelCase('__FOO_BAR__')\r// => 'fooBar'" ], "name": "camelCase", "longname": "camelCase", "kind": "function", "scope": "global", "___id": "T000002R000031", "___s": true, "filepath": "camelCase.js" }