upperFirst es-toolkit
Converts the first character of a string to uppercase.
Usage
upperFirst(str)
Use upperFirst when you want to capitalize only the first letter of a string while keeping the rest of the letters unchanged. It's useful for capitalizing the beginning of sentences or formatting names.
Useful in various situations:
Parameters
strstringrequired
The string to capitalize the first letter of.
Returns
Returns a string with the first letter converted to uppercase.
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.