--- id: jsmin version: "3.0.1" license: MIT License license_treatment: permissive maintenance: dormant --- # jsmin — JavaScript minifier. License: permissive · Maintenance: dormant · Downloads: 1.2M/mo ## What it is and what it does jsmin is a Python library that compresses JavaScript source code by stripping whitespace, comments, and other non-essential characters while preserving code behavior. It works as both a Python function you can call on JavaScript strings and as a standalone command-line tool. The package has no external runtime dependencies, making it lightweight to install. However, it explicitly does not support ECMAScript 6 or later syntax—the maintainer has stated no intention to add ES6 compatibility. If you need to minify modern JavaScript, you may need to preprocess your code or use an alternative tool. The library does offer a `quote_chars` parameter for limited workarounds on newer syntax. Use it for: - Build pipelines that need to compress JavaScript assets before deployment to reduce file size. - Development tools that process legacy ES5 JavaScript code to optimize distribution. - Automated scripts that strip comments and whitespace from JavaScript files during packaging. - Web applications serving static JavaScript where bandwidth reduction is a priority. - Integration into Python-based build systems that already handle JavaScript as part of a larger workflow. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Minifies JavaScript code by removing unnecessary characters while preserving functionality, available as both a Python library and command-line tool. Yes, if you are minifying ES5 JavaScript only. The package is stable, has no vulnerabilities, and works reliably for its stated purpose. No, if you need ES6+ support—the maintainer explicitly will not add it. Consider alternatives if your codebase uses modern JavaScript syntax. The high install friction and dormant maintenance status are acceptable trade-offs for a simple, focused tool with no dependencies, but do not expect active development. ## Install pip install jsmin uv add jsmin poetry add jsmin ## Installing jsmin Before you install: High install friction due to source distribution only. Package is dormant—last release was 2022-01-16, though the repository remains active with recent commits. No runtime dependencies simplifies installation once obtained. License in practice: MIT License (permissive) imposes no restrictions on use, modification, or redistribution in commercial or private projects. Quickstart: pip install jsmin from jsmin import jsmin with open('myfile.js') as js_file: minified = jsmin(js_file.read()) # Or from command line: python -m jsmin myfile.js Python 2 support was removed in version 3.0.0; requires Python 3 only. Verify before relying: - Whether ES6+ JavaScript is reliably handled; documentation explicitly states no ES6 compatibility is intended. - Current maintenance likelihood and likelihood of future updates given time since last release. ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags javascript minifier, minify js code, remove whitespace javascript, compress javascript, js code optimizer, strip comments javascript, reduce file size js, minification, build-tool, legacy-js [View on SkillFed](https://skillfed.io/packages/jsmin) · [View on PyPI](https://pypi.org/project/jsmin/)