pascalCase es-toolkit
Converts a string to pascal case.
Usage
pascalCase(str)
Use pascalCase when you want to convert a string to pascal case. Pascal case is a naming convention where the first letter of each word is capitalized and words are joined without separators.
It also correctly handles strings with various separators.
Parameters
strstringrequired
The string to convert to pascal case.
Returns
Returns a new string converted to pascal case.
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.