{"name":"@putout/minify","version":"4.10.0","keywords":["putout","minify","AST","babel","printer","api","traverse","generate"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/minify@4.10.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/putoutjs/minify#readme","bugs":{"url":"https://github.com/putoutjs/minify/issues"},"dist":{"shasum":"f623e0440578f6645168de52416e2e5e27297423","tarball":"http://registry-npm.ywwl.com/@putout/minify/download/@putout/minify-4.10.0.tgz","fileCount":4,"integrity":"sha512-iQy2MQc+XvnJKfTjYm/80dcnaZgxxP33VOqscwfTBSnScZkGl5TFg+UAzMlMvhp7r0MMVeizUDORkE4bz9NUUw==","signatures":[{"sig":"MEUCICk1e7x8+w6Md3++tvfnsn1OChfijqe/i/X7gpJTKrC+AiEAwJTKANOI9ENN8hB+QZ0s/Sn7Y8wMV1jCrTzMC6etpFo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1564905,"size":397974,"noattachment":false,"key":"/@putout/minify/-/@putout/minify-4.10.0.tgz"},"type":"module","engines":{"node":">=18"},"exports":{".":"./bundle/minify.min.js","./dev":"./lib/minify.js"},"gitHead":"6d5fd3d8b62ffea704e2ead8fd056e684856d7d3","scripts":{"lint":"madrun lint","test":"madrun test","build":"madrun build","minify":"madrun minify","report":"madrun report","wisdom":"madrun wisdom","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test","coverage:html":"madrun coverage:html"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"repository":{"url":"git+https://github.com/putoutjs/minify.git","type":"git"},"_npmVersion":"10.9.0","description":"🐊Putout-based minifier","directories":{},"_nodeVersion":"22.13.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","rendy":"^4.1.3","eslint":"^9.2.0","madrun":"^10.0.0","minify":"^12.0.0","montag":"^1.0.0","putout":"^37.1.1","rollup":"^4.5.0","nodemon":"^3.0.1","redlint":"^3.14.1","fullstore":"^3.0.0","supertape":"^10.0.0","try-catch":"^3.0.0","mock-require":"^3.0.3","@putout/printer":"^12.2.0","just-kebab-case":"^4.2.0","just-snake-case":"^3.2.0","@putout/plugin-esm":"^1.1.0","@putout/plugin-new":"^3.0.1","@putout/eslint-flat":"^2.0.0","@rollup/plugin-json":"^6.0.0","@putout/plugin-types":"^6.1.0","@rollup/plugin-alias":"^5.0.0","eslint-plugin-putout":"^23.1.0","@putout/plugin-for-of":"^7.1.0","@putout/plugin-minify":"^9.0.0","@putout/plugin-regexp":"^9.0.0","@putout/plugin-declare":"^4.0.0","@rollup/plugin-replace":"^6.0.1","@putout/plugin-promises":"^16.0.0","@rollup/plugin-commonjs":"^28.0.0","@putout/plugin-conditions":"^7.1.0","@putout/plugin-remove-empty":"^13.0.0","@rollup/plugin-node-resolve":"^16.0.0","rollup-plugin-polyfill-node":"^0.13.0","rollup-plugin-node-externals":"^8.0.0","@putout/plugin-remove-console":"^6.0.0","@putout/plugin-remove-debugger":"^7.0.0","@putout/plugin-simplify-ternary":"^7.0.0","@putout/plugin-logical-expressions":"^7.0.0","@putout/plugin-remove-useless-else":"^2.0.0","@putout/plugin-remove-nested-blocks":"^7.0.0","@putout/plugin-reuse-duplicate-init":"^6.0.0","@putout/plugin-remove-useless-return":"^7.0.0","@putout/plugin-remove-useless-spread":"^11.0.0","@putout/plugin-apply-optional-chaining":"^6.0.0","@putout/plugin-apply-template-literals":"^3.0.0","@putout/plugin-remove-unreachable-code":"^2.0.0","@putout/plugin-remove-unused-variables":"^11.0.0","@putout/plugin-remove-useless-arguments":"^10.1.0","@putout/plugin-remove-useless-variables":"^12.5.0","@putout/plugin-convert-arguments-to-rest":"^3.1.0","@putout/plugin-convert-to-arrow-function":"^4.0.0","@putout/plugin-merge-duplicate-functions":"^2.0.0","@putout/plugin-remove-unused-expressions":"^10.0.0","@putout/plugin-apply-shorthand-properties":"^6.1.0","@putout/plugin-remove-unreferenced-variables":"^4.0.0","@putout/plugin-merge-destructuring-properties":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/minify_4.10.0_1737646580988_0.49434704420440045","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/minify [![NPM version][NPMIMGURL]][NPMURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/minify.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/minify \"npm\"\n[CoverageURL]: https://coveralls.io/github/putoutjs/minify?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/putoutjs/minify/badge.svg?branch=master&service=github\n\n🐊[**Putout**](https://github.com/coderaiser/putout)-based JavaScript minifier.\n\n## Install\n\n```sh\nnpm i @putout/minify\n```\n\n## Supported minifier transforms\n\nHere is list of supported 🐊**Putout** transformations:\n\n- ✅ [`apply-template-literals`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-apply-template-literals#readme);\n- ✅ [`apply-optional-chaining`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-apply-optional-chaining#readme);\n- ✅ [`conditions`](https://github.com/coderaiser/putout/tree/v29.10.0/packages/plugin-conditions#readme);\n- ✅ [`convert-to-arrow-function`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-convert-to-arrow-functions#readme);\n- ✅ [`arguments`](https://github.com/coderaiser/putout/tree/v41/packages/plugin-argumentst#readme);\n- ✅ [`declare`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-declare#readme);\n- ✅ [`for-of`](https://github.com/coderaiser/putout/tree/v34.0.0/packages/plugin-for-of#readme);\n- ✅ [`logical-expressions`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-logical-expressions#readme);\n- ✅ [`merge-duplicate-functions`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-merge-duplicate-functions#readme);\n- ✅ [`esm/merge-duplicate-imports`](https://github.com/coderaiser/putout/tree/v41.0.0/packages/plugin-esm#merge-duplicate-imports);\n- ✅ [`destructuring`](https://github.com/coderaiser/putout/tree/v41.0.0/packages/plugin-destructuring#readme);\n- ✅ [`minify`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-minify#readme);\n- ✅ [`new`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-new#readme);\n- ✅ [`regexp`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-regexp#readme);\n- ✅ [`reuse-duplicate-init`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-reuse-duplicate-init#readme);\n- ✅ [`remove-empty`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-empty#readme);\n- ✅ [`remove-nested-blocks`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-nested-blocks#readme);\n- ✅ [`remove-unused-expressions`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-unused-expressions#readme);\n- ✅ [`arguments`](https://github.com/coderaiser/putout/tree/v41.0.0/packages/plugin-arguments#readme);\n- ✅ [`remove-useless-else`](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-else#readme);\n- ✅ [`return/remove-useless`](https://github.com/coderaiser/putout/tree/v41.0.0/packages/plugin-return#remove-useless);\n- ✅ [`remove-useless-spread`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-useless-spread/#readme);\n- ✅ [`variables`](https://github.com/coderaiser/putout/tree/v41.0.0/packages/plugin-variables#readme);\n- ✅ [`remove-console`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-console#readme);\n- ✅ [`remove-debugger`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-debugger#readme);\n- ✅ [`remove-unreachable-code`](https://github.com/coderaiser/putout/tree/v29.0.0/packages/plugin-remove-unreachable-code#readme);\n- ✅ [`simplify-ternary`](https://github.com/coderaiser/putout/tree/v34.0.0/packages/plugin-simplify-ternary#readme);\n- ✅ [`types`](https://github.com/coderaiser/putout/tree/v29.7.1/packages/plugin-types#readme);\n\n## API\n\n```js\nimport {minify} from '@putout/minify';\n\nminify(`\n    const a = 5;\n    const b = 6;\n    \n    fn(a, b);\n`);\n```\n\n```zig\n// returns\nvar a=5,b=6;fn(a,b);\n```\n\n### Options\n\nYou can also pass options to `minify`. Here is list of default options:\n\n```js\n({\n    quotes: `'`,\n    fixCount: 1, // the more fixCount - less output size\n    conditions: false,\n    mangleClassNames: true,\n    mangle: true,\n    mergeVariables: true,\n    removeUnusedVariables: false,\n    removeConsole: false,\n    removeUselessSpread: true,\n    applyTemplateLiterals: true,\n    convertStrictEqualToEqual: false,\n});\n```\n\nAnd usage example:\n\n```js\nimport {minify} from '@putout/minify';\n\nconst source = `\n    const a = 5;\n    const b = 6;\n`;\n\nminify(source, {\n    removeUnusedVariables: false,\n});\n```\n\n### How it's compared to X(your benchmark)?\n\n[Benchmark](https://github.com/putoutjs/minify/tree/master/benchmark)\n\n## License\n\nMIT\n","publish_time":1737646581285,"_cnpm_publish_time":1737646581285,"dist-tags":{"latest":"6.1.3"}}