camelToSnake
Converts a camelCase
string to a snake_case
string.
Parameters
str
{string}: ThecamelCase
string to convert.
Returns
{string}: The converted
kebab_case
string.
const result1 = camelToSnake('camelCaseString');
console.log(result1); // Output: camel_case_string
Last updated