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()));
Actually you do need the capturing group, because you want to omit the underscore in the result: