Skip to content

Instantly share code, notes, and snippets.

@edinella
Created November 7, 2013 05:35
Show Gist options
  • Save edinella/7349540 to your computer and use it in GitHub Desktop.
Save edinella/7349540 to your computer and use it in GitHub Desktop.
Converte snake-case para camelCase
var snakeCaseStr = 'lorem-ipsum';
var camelCaseStr = snakeCaseStr.replace(/(\-\w)/g, function(match){return match[1].toUpperCase();});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment