GuobaGuoba Utils

camel

@guoba-ai/utils / string / camel

Function: camel()

function camel(str): string;

Defined in: string.ts:111

Convert a string to camelCase.

Parameters

str

string

The string to convert

Returns

string

The camelCase version of the string

Example

camel('foo-bar') // 'fooBar'
camel('FooBar') // 'fooBar'
camel('foo_bar') // 'fooBar'

On this page