Skip to content

Instantly share code, notes, and snippets.

@developit
Created June 13, 2019 18:52
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 developit/dde9879c39804200468ad8d2368a29a8 to your computer and use it in GitHub Desktop.
Save developit/dde9879c39804200468ad8d2368a29a8 to your computer and use it in GitHub Desktop.
export default code => code.replace(/(?:[\s\t]+\/\*[\s\S]*?\*\/[\s\t]*|\s*(\n)\s*\/\/.*(?:\n\s*\/\/.*)*)/g, '$1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment