@putout/minify
🐊Putout-based minifier
Last updated 3 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/minify 
SYNC missed versions from official npm registry.

@putout/minify NPM versionΒ Coverage Status

🐊Putout-based JavaScript minifier.

Install

npm i @putout/minify

Supported minifier transforms

Here is list of supported 🐊Putout transformations:

API

import {minify} from '@putout/minify';

minify(`
    const a = 5;
    const b = 6;
    
    fn(a, b);
`);
// returns
var a=5,b=6;fn(a,b);

Options

You can also pass options to minify. Here is list of default options:

({
    fixCount: 1, // the more fixCount - less output size
    conditions: false,
    mangleClassNames: true,
    mangle: true,
    mergeVariables: true,
    removeUnusedVariables: false,
    removeConsole: false,
    removeUselessSpread: true,
    applyTemplateLiterals: true,
    convertStrictEqualToEqual: false,
});

And usage example:

import {minify} from '@putout/minify';

const source = `
    const a = 5;
    const b = 6;
`;

minify(source, {
    removeUnusedVariables: false,
});

How it's compared to X(your benchmark)?

Benchmark

License

MIT

Current Tags

  • 4.5.2                                ...           latest (3 months ago)

165 Versions

  • 4.5.2                                ...           3 months ago
  • 4.5.1                                ...           3 months ago
  • 4.5.0                                ...           5 months ago
  • 4.4.0                                ...           5 months ago
  • 4.3.1                                ...           6 months ago
  • 4.3.0                                ...           6 months ago
  • 4.2.0                                ...           6 months ago
  • 4.1.0                                ...           6 months ago
  • 4.0.1                                ...           6 months ago
  • 4.0.0                                ...           6 months ago
  • 3.20.0                                ...           6 months ago
  • 3.19.7                                ...           6 months ago
  • 3.19.6                                ...           6 months ago
  • 3.19.5                                ...           6 months ago
  • 3.19.4                                ...           6 months ago
  • 3.19.3                                ...           7 months ago
  • 3.19.2                                ...           7 months ago
  • 3.19.1                                ...           7 months ago
  • 3.19.0                                ...           7 months ago
  • 3.18.0                                ...           7 months ago
  • 3.17.1                                ...           7 months ago
  • 3.17.0                                ...           7 months ago
  • 3.16.0                                ...           7 months ago
  • 3.15.0                                ...           7 months ago
  • 3.14.0                                ...           7 months ago
  • 3.13.0                                ...           7 months ago
  • 3.12.1                                ...           7 months ago
  • 3.12.0                                ...           7 months ago
  • 3.11.2                                ...           7 months ago
  • 3.11.1                                ...           7 months ago
  • 3.11.0                                ...           7 months ago
  • 3.10.3                                ...           7 months ago
  • 3.10.2                                ...           7 months ago
  • 3.10.1                                ...           7 months ago
  • 3.10.0                                ...           7 months ago
  • 3.9.0                                ...           8 months ago
  • 3.8.5                                ...           10 months ago
  • 3.8.4                                ...           10 months ago
  • 3.8.3                                ...           10 months ago
  • 3.8.2                                ...           10 months ago
  • 3.8.1                                ...           10 months ago
  • 3.8.0                                ...           10 months ago
  • 3.7.0                                ...           a year ago
  • 3.6.1                                ...           a year ago
  • 3.6.0                                ...           a year ago
  • 3.5.0                                ...           a year ago
  • 3.4.0                                ...           a year ago
  • 3.3.0                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.2                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.11.0                                ...           a year ago
  • 2.10.2                                ...           a year ago
  • 2.10.1                                ...           a year ago
  • 2.10.0                                ...           a year ago
  • 2.9.0                                ...           a year ago
  • 2.8.0                                ...           a year ago
  • 2.7.0                                ...           a year ago
  • 2.6.1                                ...           a year ago
  • 2.6.0                                ...           a year ago
  • 2.5.0                                ...           a year ago
  • 2.4.1                                ...           a year ago
  • 2.4.0                                ...           a year ago
  • 2.3.0                                ...           a year ago
  • 2.2.2                                ...           a year ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.50.2                                ...           a year ago
  • 1.50.1                                ...           a year ago
  • 1.50.0                                ...           a year ago
  • 1.49.0                                ...           a year ago
  • 1.48.0                                ...           a year ago
  • 1.47.0                                ...           a year ago
  • 1.46.0                                ...           a year ago
  • 1.45.0                                ...           a year ago
  • 1.44.1                                ...           a year ago
  • 1.44.0                                ...           2 years ago
  • 1.43.0                                ...           2 years ago
  • 1.42.0                                ...           2 years ago
  • 1.41.0                                ...           2 years ago
  • 1.40.0                                ...           2 years ago
  • 1.39.1                                ...           2 years ago
  • 1.39.0                                ...           2 years ago
  • 1.38.0                                ...           2 years ago
  • 1.37.1                                ...           2 years ago
  • 1.37.0                                ...           2 years ago
  • 1.36.1                                ...           2 years ago
  • 1.36.0                                ...           2 years ago
  • 1.35.3                                ...           2 years ago
  • 1.35.2                                ...           2 years ago
  • 1.35.1                                ...           2 years ago
  • 1.35.0                                ...           2 years ago
  • 1.34.1                                ...           2 years ago
  • 1.34.0                                ...           2 years ago
  • 1.33.0                                ...           2 years ago
  • 1.32.1                                ...           2 years ago
  • 1.32.0                                ...           2 years ago
  • 1.31.0                                ...           2 years ago
  • 1.30.0                                ...           2 years ago
  • 1.29.1                                ...           2 years ago
  • 1.29.0                                ...           2 years ago
  • 1.28.1                                ...           2 years ago
  • 1.28.0                                ...           2 years ago
  • 1.27.2                                ...           2 years ago
  • 1.27.1                                ...           2 years ago
  • 1.27.0                                ...           2 years ago
  • 1.26.0                                ...           2 years ago
  • 1.25.0                                ...           2 years ago
  • 1.24.0                                ...           2 years ago
  • 1.23.0                                ...           2 years ago
  • 1.22.3                                ...           2 years ago
  • 1.22.2                                ...           2 years ago
  • 1.22.1                                ...           2 years ago
  • 1.22.0                                ...           2 years ago
  • 1.21.0                                ...           2 years ago
  • 1.20.3                                ...           2 years ago
  • 1.20.2                                ...           2 years ago
  • 1.20.1                                ...           2 years ago
  • 1.20.0                                ...           2 years ago
  • 1.19.1                                ...           2 years ago
  • 1.19.0                                ...           2 years ago
  • 1.18.1                                ...           2 years ago
  • 1.18.0                                ...           2 years ago
  • 1.17.4                                ...           2 years ago
  • 1.17.3                                ...           2 years ago
  • 1.17.2                                ...           2 years ago
  • 1.17.1                                ...           2 years ago
  • 1.17.0                                ...           2 years ago
  • 1.16.5                                ...           2 years ago
  • 1.16.4                                ...           2 years ago
  • 1.16.3                                ...           2 years ago
  • 1.16.2                                ...           2 years ago
  • 1.16.1                                ...           2 years ago
  • 1.16.0                                ...           2 years ago
  • 1.15.0                                ...           2 years ago
  • 1.14.0                                ...           2 years ago
  • 1.13.1                                ...           2 years ago
  • 1.13.0                                ...           2 years ago
  • 1.12.0                                ...           2 years ago
  • 1.11.0                                ...           2 years ago
  • 1.10.0                                ...           2 years ago
  • 1.9.0                                ...           2 years ago
  • 1.8.0                                ...           2 years ago
  • 1.7.0                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (58)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE