Converts a string to snake case. Based on https://es-toolkit.slash.page/reference/string/kebabCase.html
This function converts a string to snake case, replacing spaces with underscores and converting uppercase letters to lowercase, prefixed with an underscore.
The string to be converted to snake case.
The snake case string.
snakeCase("Hello World"); // "hello_world"snakeCase("snakeCaseString"); // "snake_case_string" Copy
snakeCase("Hello World"); // "hello_world"snakeCase("snakeCaseString"); // "snake_case_string"
Converts a string to snake case. Based on https://es-toolkit.slash.page/reference/string/kebabCase.html
This function converts a string to snake case, replacing spaces with underscores and converting uppercase letters to lowercase, prefixed with an underscore.