# camelCase

FUNCTION in `@skmtc/core 0.63.4`

Converts a string to camelCase, removing non-alphanumeric characters.

This function handles various input formats including kebab-case, snake_case,
space-separated words, and mixed formats. It intelligently capitalizes words
after the first unless `upperFirst` is specified.

## Signature

```ts
import { camelCase } from '@skmtc/core'

camelCase(str: string, options?: CamelCaseOptions): string
```

## Parameters

- `str` (string, required): The string to convert to camelCase
- `options` (CamelCaseOptions): Options to control the conversion
  - `upperFirst` (boolean): Whether to capitalize the first character (PascalCase)
  - `retainUnderscores` (boolean): Whether to retain underscores in place when converting strings

## Examples

Basic usage:

```ts
camelCase('hello world'); // 'helloWorld'
camelCase('user-name'); // 'userName'
camelCase('api_key'); // 'apiKey'
camelCase('HTTP-Response'); // 'httpResponse'
```

PascalCase (upperFirst):

```ts
camelCase('user profile', { upperFirst: true }); // 'UserProfile'
camelCase('api-client', { upperFirst: true }); // 'ApiClient'
```

Complex inputs:

```ts
camelCase('get-user-by-id'); // 'getUserById'
camelCase('XML_HTTP_Request'); // 'xmlHttpRequest'
camelCase('2fa-enabled'); // '2faEnabled'
```

Retaining underscores (retainUnderscores):

```ts
camelCase('user_name', { retainUnderscores: true }); // 'user_name'
camelCase('api-key_token', { retainUnderscores: true }); // 'apiKey_token'
camelCase('get_user_by_id', { retainUnderscores: true }); // 'get_user_by_id'
camelCase('user_profile', { upperFirst: true, retainUnderscores: true }); // 'User_profile'
```

## Returns

`string`

The camelCase version of the input string
