camelToKebab
Converts a camelCase string to a kebab-case string.
This function converts a camelCase string to a kebab-case string.
Parameters
str{string}: ThecamelCasestring to convert.
Returns
{string}: The converted
kebab-casestring.
// Example 1
const result1 = camelToKebab('camelCaseString');
console.log(result1); // Output: camel-case-string
// Example 2
const result2 = camelToKebab('anotherExampleString');
console.log(result2); // Output: another-example-stringLast updated