Skip to content

Instantly share code, notes, and snippets.

@lucaswinningham
Created September 15, 2023 18:33
Show Gist options
  • Save lucaswinningham/a7c14243b01ef348f2f43d3421980fd2 to your computer and use it in GitHub Desktop.
Save lucaswinningham/a7c14243b01ef348f2f43d3421980fd2 to your computer and use it in GitHub Desktop.
Search for imports in Node using regex
import\s*\{[\n\s]*(\w+\s*,\s*)*\bUploadSnackbar\b(\s*,\s*\w+\s*,*\s*|\s*,*)*[\n\s]*\}\s*from\s*('|")\s*.*\bMyComponent\b.*\s*('|")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment