Skip to content

pantoken-root / 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"