Convert API
toKebab()
Converts the passed arguments to "kebab-case" format.
- Accepts arguments as strings and arrays of strings.
Each value is seen as a new argument. - Returns the converted string if a single argument is passed and an array of strings if multiple arguments are passed.
Example:
toKebab('fontSize');
// 'font-size'
toKebab(['fontSize']);
// 'font-size'
toKebab('border_radius', 'border-color', 'borderStyle');
// ['border-radius', 'border-color', 'border-style']
toKebab(['borderRadius', 'border_color']);
// ['border-radius', 'border-color']
toKebab('font_size', ['borderRadius', 'border-color']);
// ['font-size', 'border-radius', 'border-color']
toKebab('fontSize: 10px, border_radius: 10px');
// 'font-size: 10px, border-radius: 10px'