startCase es-toolkit
Converts the first letter of each word in a string to uppercase.
Usage
startCase(str)
Use startCase when you want to convert a string to start case (where the first letter of each word is capitalized). It capitalizes the first letter of each word, converts the rest to lowercase, and joins the words with spaces.
It also correctly handles strings with various delimiters and special characters.
Parameters
strstringrequired
The string to convert to start case.
Returns
Returns a new string with the first letter of each word capitalized and joined with spaces.
Try It
::: sandpack
:::
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.