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"