Skip to content

camelCaseToKebabCase()

camelCaseToKebabCase(input): string

Defined in: utils/string/camelCaseToKebabCase.ts:13

Converts a camelCase string to kebab-case.

Parameters

input

string

The camelCase string.

Returns

string

The kebab-case string.

Example

tsx
camelCaseToKebabCase('camelCaseString'); // 'camel-case-string'
camelCaseToKebabCase('anotherExample'); // 'another-example'

Released under the MIT License.