Skip to content

pantoken / packages/core/src / toKebab

دالة: toKebab()

toKebab(str): string

بيتا

حوّل سلسلة بنمط CamelCase أو ذات مسافات إلى kebab-case.

المعلمات

str

string

القيم المرجعة

string

مثال

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

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