Skip to content

pantoken / packages/core/src / toKebab

Función: toKebab()

toKebab(str): string

Beta

Convierte una cadena CamelCase / con espacios a kebab-case.

Parámetros

str

string

Devuelve

string

Ejemplo

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

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