Skip to content

dependabit / utils/src / kebabCase

Function: kebabCase()

ts
function kebabCase(str): string;

Defined in: packages/utils/src/string.ts:45

Converts a string to kebab-case.

Parameters

ParameterTypeDescription
strstringThe string to convert.

Returns

string

The kebab-case string.

Example

ts
kebabCase('HelloWorld'); // 'hello-world'

Released under the MIT License.