@empathyco/x-components
Version:
Empathy X Components
31 lines (17 loc) • 814 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[](./index.md) > [@empathyco/x-components](./x-components.md) > [toKebabCase](./x-components.tokebabcase.md)
Util to transform string a into kebab case.
**Signature:**
```typescript
export declare function toKebabCase(str: string): string;
```
| Parameter | Type | Description |
| --- | --- | --- |
| str | string | String value. |
**Returns:**
string
Returns the string in kebab case.
Transforms `camelCase` into `camel-case` Transforms `PascalCase` into `pascal-case` Transforms `snake_case` into `snake-case` Transforms `space space multispaces` into `space-space-multiplespaces` Transforms `kebab-case` into `kebab-case`