Joined January 2019
·

turtlerherder

Posted to Convert snake-case to camelCase over 1 year ago

Actually you do need the capturing group, because you want to omit the underscore in the result:

value.replace(/_(\w)/g, (m => m[1].toUpperCase()));
Achievements
1 Karma
0 Total ProTip Views