Skip to content

Function: camelCase()

ts
function camelCase(value): string;

Converts a string to camelCase. 将字符串转换为 camelCase。

Parameters

ParameterTypeDescription
valuestringThe source string / 源字符串

Returns

string

The camel-cased string / 转换后的 camelCase 字符串

Example

ts
camelCase('foo-bar')
// => 'fooBar'

Since

1.2.0

Released under the MIT License.