Skip to content

Instantly share code, notes, and snippets.

@gunn
Created November 14, 2018 23:09
Show Gist options
  • Save gunn/66351f84161b9bdb3c201ae69414a39a to your computer and use it in GitHub Desktop.
Save gunn/66351f84161b9bdb3c201ae69414a39a to your computer and use it in GitHub Desktop.
const camelize = (text, separator="_")=> (
text.split(separator)
.map(w=> w.replace(/./, m=> m.toUpperCase()))
.join()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment