Skip to content

xdash API Reference v0.5.14


xdash API Reference / camelCase

Function: camelCase()

camelCase(str): string

Defined in: src/string.ts:25

Converts a string to camelCase

Parameters

str

string

string to convert

Returns

string

the string in camelCase

Example

ts
camelCase('foo-bar') // returns 'fooBar'
camelCase('foo_bar') // returns 'fooBar'
camelCase('FooBar') // returns 'fooBar'
camelCase('FOO_BAR') // returns 'fooBar'

Released under the MIT License.