Skip to content

Instantly share code, notes, and snippets.

@adamcrampton
Created November 5, 2018 00:34
Show Gist options
  • Save adamcrampton/34c0d91f0affc79f83314ed6621a8688 to your computer and use it in GitHub Desktop.
Save adamcrampton/34c0d91f0affc79f83314ed6621a8688 to your computer and use it in GitHub Desktop.
Replace spaces with hyphens
someString = someString.replace(/\s+/g, '-');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment