Skip to content

Instantly share code, notes, and snippets.

@MiguelCastillo
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save MiguelCastillo/b945ceb0ca99c23b71ec to your computer and use it in GitHub Desktop.

Select an option

Save MiguelCastillo/b945ceb0ca99c23b71ec to your computer and use it in GitHub Desktop.
Regex to test if function is minified and if its big enough that it's hard enough to read that you can just skip...
// Heuristic to guess if code is minified.
// http://regex101.com/r/oE3nP0
if ( /function[ ]?\w*\([\w,]*\)\{(?:\S[ ]?){1000,}\}/g.test(text) ) {
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment