Mini JS Minifier
Golfed by xem
Found a bug? Want a new feature? open an issue
Nothing to minify? Try my test file or jQuery or Modernizr
Simple compression (121 bytes)
- Removes comments
- Removes unnecessary whitespaces
- Removes unnecessary semicolons
- Warning: doesn't preserve strings
<textarea oninput='value=value.replace(/(\/\*[^]*?\*\/|\/\/.*|\s)+/g," ").replace(/^ *|; *(})|;? *?$| *(\W) */g,"$1$2")'>