Skip to content

pantoken / packages/core/src / toKebab

Funktion: toKebab()

toKebab(str): string

Beta

Konverter en CamelCase / afstandstakt streng til kebab-case.

Parametre

str

string

Returnerer

string

Eksempel

ts
import { toKebab } from "@pantoken/core";

toKebab("baseButton");   // → "base-button"
toKebab("Font Family");  // → "font-family"
toKebab("rebrandLight"); // → "rebrand-light"