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