Simple & Safe JavaScript Minifier
Sep 22, 2014ProgrammingComments (1)
This JavaScript minifier removes all line breaks, tabs, comments, trailing semi-colons, and any unnecessary spaces. It performs no sorting or compressing, so it won't have any impact on how your JavaScript executes.
Instead of performing sweeping string replacements, this minifier goes through the JavaScript source code character-by-character. It keeps track of when it's inside a comment or string, so it won't mess up your string text. That also means that if there are comments, newlines, or multiple spaces inside of a string, it will treat them correctly as a string and not remove them.
How it works
Instead of performing sweeping string replacements, this minifier goes through the JavaScript source code character-by-character. It keeps track of when it's inside a comment or string, so it won't mess up your string text. That also means that if there are comments, newlines, or multiple spaces inside of a string, it will treat them correctly as a string and not remove them.