Skip to content

Instantly share code, notes, and snippets.

@EQuimper
Created July 6, 2020 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EQuimper/219cb0eb95084bb1501989458bd8927a to your computer and use it in GitHub Desktop.
Save EQuimper/219cb0eb95084bb1501989458bd8927a to your computer and use it in GitHub Desktop.
export const toCamel = (value: string): string => (
value.replace(/([-_][a-z])/ig, ($1) => $1.toUpperCase()
.replace("-", "")
.replace("_", ""))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment