With regex (i assume) or some other method, how can i convert things like:
marker-image or my-example-setting to markerImage o
marker-image
my-example-setting
markerImage
This is one of the great utilities that Lodash offers if you are enlightened and have it included in your project.
var str = 'my-hyphen-string'; str = _.camelCase(str); // results in 'myHyphenString'