Skip to content

Instantly share code, notes, and snippets.

@garystorey
Created October 30, 2014 18:12
Show Gist options
  • Select an option

  • Save garystorey/579656d2e0046d280324 to your computer and use it in GitHub Desktop.

Select an option

Save garystorey/579656d2e0046d280324 to your computer and use it in GitHub Desktop.
camelCase.js
function camelCase( s ) {
return s.replace(/\-(\w)/g, function( i, m ){
return m.toUpperCase();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment