Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 85d8962150
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 695 Bytes
JsShrink - Remove spaces and comments from JavaScript code
Available in PHP and JavaScript
Requires statements ending by semicolon, use JSHint or JSLint to verify.
Usage PHP:
include "jsShrink.php";
echo jsShrink($code);
Usage JavaScript:
<script type="text/javascript" src="jsShrink.js"></script>
<script type="text/javascript">
textarea.value = jsShrink(code);
Google Closure Compiler is much more powerful and efficient tool.
JsShrink was created for those looking for PHP or JavaScript only solution.
Most other JS minifiers are not able to process valid JavaScript code:
Jump to Line
Something went wrong with that request. Please try again.