How to use the javascript minifier
- Paste your JavaScript.
- Choose whether to shorten names and simplify code.
- Copy the minified code.
What the options do
- Shorten variable names (mangle): renames local variables to single letters. Global names stay the same.
- Simplify code (compress): removes dead code and rewrites expressions more compactly.
- Keep licence comments: keeps comments with @license or starting with /*!.
Examples
function add(n,d){return n+d}
An error with the line and column