Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save MiguelCastillo/1a9dd73c7d7f74b0e35e to your computer and use it in GitHub Desktop.
Strip Minified code
function stripMinified(text) {
// var regex = /function[ ]?\w*\([\w,]*\)\{(?:\S[\s]?){150,}\}/gm;
// var regex = /(?:\S[\s]?){150,}[\n]$/gm;
var regex = /(?:.){250,}/gm;
return text.replace(regex, function() {return "";});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment