xdashReadme | API


xdash / camelCase

Function: camelCase()

camelCase(str): string

Converts a string to camelCase

Parameters

str: string

string to convert

Returns

string

the string in camelCase

Example

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

Source

str.ts:25