API
@agape/string

toCamelCase Function

Converts a string to camelCase.

API

function toCamelCase(  input: string): string

toCamelCase

string

Converts a string to camelCase.

@paraminput:  string
The input string to be camelized.
@returnsstring

Description

Converts a string to camelCase. Removes all non-alphanumeric separators and capitalizes each word except the first.

Usage

toCamelCase("hello world"); // "helloWorld"
toCamelCase("Hello_world"); // "helloWorld"
toCamelCase("API_response_code"); // "apiResponseCode"
toCamelCase("user-42-profile"); // "user42Profile"
toCamelCase("ThisIsALongVariableName"); // "thisIsALongVariableName"