camelCase es-toolkit
Converts a string to camel case.
Usage
camelCase(str)
Use camelCase when you want to convert a string to camel case. Camel case is a naming convention where the first word is lowercase and the first letter of each subsequent word is capitalized.
It converts strings with special characters, spaces, hyphens, and other separators into a format suitable for JavaScript variable names or object property names.
It also preserves Unicode characters.
Parameters
strstringrequired
The string to convert to camel case.
Returns
Returns a new string converted to camel 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.