kebabCase es-toolkit
Converts a string to kebab case.
Usage
kebabCase(str)
Use kebabCase when you want to convert a string to kebab case. Kebab case is a naming convention where each word is written in lowercase and connected with dashes (-).
This function is useful when creating API endpoints, CSS class names, HTML attributes, etc.
Parameters
strstringrequired
The string to convert to kebab case.
Returns
The string converted to kebab case.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.