Skip to content

pantoken / packages/core/src / toKebab

Funkcja: toKebab()

toKebab(str): string

Beta

Konwertuje ciąg CamelCase lub zawierający spacje na kebab-case.

Parametry

str

string

Zwraca

string

Przykład

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

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