Skip to content

camelCase

js
_.camelCase([string=''])

string 转换为 驼峰式大小写

¥Converts string to camel case.

新增于

¥Since

3.0.0

参数

¥Arguments

  1. [string=''] (字符串):要去毛刺的字符串。

    ¥[string=''] (string): The string to convert.

返回

¥Returns

(字符串):返回驼峰式字符串。

¥(string): Returns the camel cased string.

示例

¥Example

js
_.camelCase('Foo Bar');
// => 'fooBar'

_.camelCase('--foo-bar--');
// => 'fooBar'

_.camelCase('__FOO_BAR__');
// => 'fooBar'

Lodash v4.17 中文网 - 粤ICP备13048890号