UNPKG

@empathyco/x-components

Version:
61 lines (29 loc) 949 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 <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> str </td><td> string </td><td> String value. </td></tr> </tbody></table> **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`