Skip to content

pantoken / packages/core/src / toKebab

Funció: toKebab()

toKebab(str): string

Beta

Converteix una cadena CamelCase / amb espais a kebab-case.

Paràmetres

str

string

Retorna

string

Exemple

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

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