Skip to content

Instantly share code, notes, and snippets.

@aradnom
Created October 17, 2017 23:14
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 aradnom/0130934ed57ee7efb458ae3d8af059d2 to your computer and use it in GitHub Desktop.
Save aradnom/0130934ed57ee7efb458ae3d8af059d2 to your computer and use it in GitHub Desktop.
Simple regex for replacing pre-ES6-style functions with ES6-style functions
Find: function \((\s)?(.*)(\s)?\) {
Replace: ($1$2$3) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment