UNPKG

@empathyco/x-components

Version:
31 lines (17 loc) 814 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [toKebabCase](./x-components.tokebabcase.md) ## toKebabCase() function Util to transform string a into kebab case. **Signature:** ```typescript export declare function toKebabCase(str: string): string; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | str | string | String value. | **Returns:** string Returns the string in kebab case. ## Example 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`