Skip to content

pantoken / packages/core/src / toKebab

Função: toKebab()

toKebab(str): string

Beta

Converter uma string CamelCase / com espaços para kebab-case.

Parâmetros

str

string

Retorna

string

Exemplo

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

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