Skip to content

Instantly share code, notes, and snippets.

@storybynumbers
Created January 20, 2015 16:20
Show Gist options
  • Save storybynumbers/cd08617e6777e6162dee to your computer and use it in GitHub Desktop.
Save storybynumbers/cd08617e6777e6162dee to your computer and use it in GitHub Desktop.
Filtering out pubsub events from my console.log()

I broadcast all of my pubsub events to console.log() in this format:

["Event: SOME_EVENT"]

The regex is tested against the message, but also the filename, so that must be held into account. To filter them out using regex in Chrome.

^(?!\["Event:*.)(?!.*\.js)

Before:

After:

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