{"id":42913,"library":"jsmin.js","title":"jsmin.js","description":"jsmin.js v1.1.0 is a minimal command-line JavaScript minifier that removes non-essential whitespace, comments, and blank lines while preserving shebangs and strings. Inspired by Crockford's JSMin but implemented in just 34 lines of clever (not clean) JavaScript with no braces '{}' in the source. It is a single-file, zero-dependency CLI tool for file-by-file minification. Slower release cadence, last updated in 2020. Differentiator: extremely compact implementation, but limited to basic transformations and lacks configuration options.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/syall/jsmin","tags":["javascript"],"install":[{"cmd":"npm install jsmin.js","lang":"bash","label":"npm"},{"cmd":"yarn add jsmin.js","lang":"bash","label":"yarn"},{"cmd":"pnpm add jsmin.js","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"jsmin.js is a CLI tool, not a library. There is no JavaScript import or require path. Use via command line or npx.","wrong":"require('jsmin.js')","symbol":"jsmin","correct":"npx jsmin.js input.js output.min.js"}],"quickstart":{"code":"echo 'var x = 1; // comment' > test.js && npx jsmin.js test.js && cat test.min.js","lang":"typescript","description":"Minify a JavaScript file using the CLI, output written to .min.js sibling file."},"warnings":[{"fix":"Ensure all input files use 'use strict'; directives where expected.","message":"The minifier assumes 'use strict'; style and may break code that does not follow strict mode JavaScript.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need fine-grained control, consider using a configurable minifier like Terser or UglifyJS.","message":"No configuration options: always removes comments and whitespace aggressively, which may break code relying on ASI or line-sensitive patterns.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Backup original files before minification.","message":"Output always overwrites or creates a file with '.min.js' suffix; no dry-run or in-memory mode.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2020':72 '34':36 'basic':80 'blank':20 'brace':45 'cadenc':68 'clean':41 'clever':39 'cli':58 'command':8 'command-lin':7 'comment':18 'compact':75 'configur':84 'crockford':29 'depend':57 'differenti':73 'essenti':16 'extrem':74 'file':54,62,64 'file-by-fil':61 'implement':33,76 'inspir':27 'javascript':10,42,86 'jsmin':31 'jsmin.js':1,2 'lack':83 'last':69 'limit':78 'line':9,21,37 'minif':65 'minifi':11 'minim':6 'non':15 'non-essenti':14 'option':85 'preserv':23 'releas':67 'remov':13 'shebang':24 'singl':53 'single-fil':52 'slower':66 'sourc':48 'string':26 'tool':59 'transform':81 'updat':70 'v1.1.0':3 'whitespac':17 'zero':56 'zero-depend':55","created_at":"2026-06-05T16:57:16.326674+00:00","updated_at":"2026-06-05T16:57:16.326674+00:00","problems":[{"fix":"Run 'npm install -g jsmin.js' or use full path './jsmin.js'.","cause":"The package is not installed or the name is mistyped.","error":"npx: command not found: jsmin.js"},{"fix":"Use the CLI via npx or global install: npx jsmin.js <file>","cause":"Attempting to require() the package as a Node.js module when it is a CLI-only tool.","error":"Error: Cannot find module 'jsmin.js'"},{"fix":"Add 'use strict'; at the top of your file or rewrite code to be strict-mode compatible.","cause":"Input contains JavaScript that does not strictly conform to 'use strict' mode assumptions.","error":"SyntaxError: Unexpected token: operator"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/syall/jsmin","github":"https://github.com/syall/jsmin","docs":null,"changelog":null,"pypi":null,"npm":"jsmin.js","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}