{"ok":true,"result":{"slug":"javascript-minifier","name":"JavaScript Minifier","summary":"Minify JavaScript with terser (mangle names, compress, drop comments) or pretty-print it. Syntax errors come back with line and column.","description":"Minify JavaScript with Terser to cut file size, with options to mangle names, compress code and keep licence comments. Beautify minified scripts to read them again.","method":"POST","endpoint":"/api/v1/tools/javascript-minifier","plan":"free","mcpName":"javascript_minifier","input":{"type":"object","additionalProperties":false,"properties":{"input":{"type":"string","description":"The JavaScript source (up to 100,000 characters).","maxLength":100000},"mode":{"type":"string","description":"minify or format (pretty-print).","default":"minify","enum":["minify","format"],"maxLength":200000},"mangle":{"type":"boolean","description":"Shorten local variable and function names when minifying.","default":true},"compress":{"type":"boolean","description":"Apply compressions such as dead-code removal and constant folding when minifying.","default":true},"keepLicenseComments":{"type":"boolean","description":"Keep /*! and @license comments when minifying; all other comments are removed.","default":false},"ecma":{"type":"integer","description":"Highest ECMAScript version the minified output may use: 5, 2015, 2016, 2017, 2018, 2019 or 2020.","default":2020,"minimum":5,"maximum":2020},"module":{"type":"boolean","description":"Parse as an ES module (allows import/export and top-level mangling).","default":false},"indent":{"type":"integer","description":"Spaces per indent level when formatting.","default":2,"minimum":1,"maximum":8}},"required":["input"]},"example":{"input":"function add(first, second) {\n  // Sum two numbers\n  return first + second;\n}\nconsole.log(add(2, 3));"},"randomOutput":false,"network":false,"docs":"https://pithlab.com/developers/tools/javascript-minifier","page":"https://pithlab.com/tools/javascript-minifier"}}