kebabCase
stringConverts string to kebab case.
Signature
kebabCase(str: string): stringParameters
| Name | Type | Description |
|---|---|---|
str | string | The string to convert |
Returns
string - Returns the kebab cased string
Examples
Basic Usage
import { kebabCase } from 'dashlite'
const result = kebabCase('fooBar')
console.log(result)Output:
foo-barWith Spaces
import { kebabCase } from 'dashlite'
const result = kebabCase('Foo Bar Baz')
console.log(result)Output:
foo-bar-bazAvailable since version 1.0.0