Converts a kebab-case string to camelCase.
The string to convert.
The camelCase string.
This function is primarily useful for converting attributes to JavaScript property names. Leading and trailing hyphens are removed before conversion.
keb2cam('background-color') // 'backgroundColor'keb2cam('-webkit-transform') // 'webkitTransform' Copy
keb2cam('background-color') // 'backgroundColor'keb2cam('-webkit-transform') // 'webkitTransform'
If str is not a string.
str
String.prototype.replace
Converts a kebab-case string to camelCase.