Skip to content

Instantly share code, notes, and snippets.

@jbnv jbnv/camelize.js
Created Jun 22, 2015

What would you like to do?
camelize() function in JavaScript
camelize = function (str) {
return str.replace(/[\-_](\w)/g, function (match) {
return match.charAt(1).toUpperCase();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.