Skip to content

Instantly share code, notes, and snippets.

@daniellmb
Created April 7, 2015 18:56
Show Gist options
  • Save daniellmb/ebda79f5f180b64eb260 to your computer and use it in GitHub Desktop.
Save daniellmb/ebda79f5f180b64eb260 to your computer and use it in GitHub Desktop.
Convert Camelcase To Hyphencase In Just Seventy Bytes
'wowConvertCamelcaseToHyphencaseInJustSeventyBytes'.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment