Last active
August 29, 2015 14:03
-
-
Save MiguelCastillo/1a9dd73c7d7f74b0e35e to your computer and use it in GitHub Desktop.
Strip Minified code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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