Skip to content

Instantly share code, notes, and snippets.

@bdcravens
Created August 23, 2021 16:52
Show Gist options
  • Save bdcravens/40d3e9b3f48876d6b9fda00a47b856fb to your computer and use it in GitHub Desktop.
Save bdcravens/40d3e9b3f48876d6b9fda00a47b856fb to your computer and use it in GitHub Desktop.
Regex to convert es6 class methods to functions

regex: async ([a-zA-Z]+)(\(.*\))

substitution: exports.$1 = async $2 =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment