snakeCase es-toolkit
Converts a string to snake case.
Usage
snakeCase(str)
Use snakeCase when you want to convert a string to snake case. Snake case is a naming convention where each word is written in lowercase and words are connected with underscores (_).
It also correctly handles strings with various separators.
Parameters
strstringrequired
The string to convert to snake case.
Returns
Returns a new string converted to snake 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.