@putout/minify
🐊Putout-based minifier
Last updated 10 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 (2 months ago)

165 Versions

  • 4.5.2                                ...           2 months ago
  • 4.5.1                                ...           2 months ago
  • 4.5.0                                ...           4 months ago
  • 4.4.0                                ...           4 months ago
  • 4.3.1                                ...           5 months ago
  • 4.3.0                                ...           5 months ago
  • 4.2.0                                ...           5 months ago
  • 4.1.0                                ...           5 months ago
  • 4.0.1                                ...           5 months ago
  • 4.0.0                                ...           5 months ago
  • 3.20.0                                ...           5 months ago
  • 3.19.7                                ...           5 months ago
  • 3.19.6                                ...           5 months ago
  • 3.19.5                                ...           5 months ago
  • 3.19.4                                ...           5 months ago
  • 3.19.3                                ...           5 months ago
  • 3.19.2                                ...           5 months ago
  • 3.19.1                                ...           5 months ago
  • 3.19.0                                ...           5 months ago
  • 3.18.0                                ...           5 months ago
  • 3.17.1                                ...           5 months ago
  • 3.17.0                                ...           5 months ago
  • 3.16.0                                ...           5 months ago
  • 3.15.0                                ...           5 months ago
  • 3.14.0                                ...           5 months ago
  • 3.13.0                                ...           5 months ago
  • 3.12.1                                ...           5 months ago
  • 3.12.0                                ...           5 months ago
  • 3.11.2                                ...           6 months ago
  • 3.11.1                                ...           6 months ago
  • 3.11.0                                ...           6 months ago
  • 3.10.3                                ...           6 months ago
  • 3.10.2                                ...           6 months ago
  • 3.10.1                                ...           6 months ago
  • 3.10.0                                ...           6 months ago
  • 3.9.0                                ...           6 months ago
  • 3.8.5                                ...           8 months ago
  • 3.8.4                                ...           8 months ago
  • 3.8.3                                ...           8 months ago
  • 3.8.2                                ...           8 months ago
  • 3.8.1                                ...           9 months ago
  • 3.8.0                                ...           9 months ago
  • 3.7.0                                ...           10 months ago
  • 3.6.1                                ...           10 months ago
  • 3.6.0                                ...           10 months ago
  • 3.5.0                                ...           10 months ago
  • 3.4.0                                ...           10 months ago
  • 3.3.0                                ...           10 months ago
  • 3.2.0                                ...           10 months ago
  • 3.1.2                                ...           10 months ago
  • 3.1.1                                ...           10 months ago
  • 3.1.0                                ...           10 months ago
  • 3.0.1                                ...           10 months 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                                ...           a year ago
  • 1.43.0                                ...           a year ago
  • 1.42.0                                ...           a year ago
  • 1.41.0                                ...           a year ago
  • 1.40.0                                ...           a year ago
  • 1.39.1                                ...           a year ago
  • 1.39.0                                ...           a year ago
  • 1.38.0                                ...           a year ago
  • 1.37.1                                ...           a year ago
  • 1.37.0                                ...           a year ago
  • 1.36.1                                ...           a year ago
  • 1.36.0                                ...           a year ago
  • 1.35.3                                ...           a year ago
  • 1.35.2                                ...           a year ago
  • 1.35.1                                ...           a year ago
  • 1.35.0                                ...           a year ago
  • 1.34.1                                ...           a year ago
  • 1.34.0                                ...           a year ago
  • 1.33.0                                ...           a year ago
  • 1.32.1                                ...           a year ago
  • 1.32.0                                ...           a year ago
  • 1.31.0                                ...           a year ago
  • 1.30.0                                ...           a year ago
  • 1.29.1                                ...           a year ago
  • 1.29.0                                ...           a year ago
  • 1.28.1                                ...           a year ago
  • 1.28.0                                ...           a year ago
  • 1.27.2                                ...           a year ago
  • 1.27.1                                ...           a year ago
  • 1.27.0                                ...           a year ago
  • 1.26.0                                ...           a year ago
  • 1.25.0                                ...           a year ago
  • 1.24.0                                ...           a year ago
  • 1.23.0                                ...           a year ago
  • 1.22.3                                ...           a year ago
  • 1.22.2                                ...           a year ago
  • 1.22.1                                ...           a year ago
  • 1.22.0                                ...           a year ago
  • 1.21.0                                ...           a year ago
  • 1.20.3                                ...           a year ago
  • 1.20.2                                ...           a year ago
  • 1.20.1                                ...           a year ago
  • 1.20.0                                ...           a year ago
  • 1.19.1                                ...           a year ago
  • 1.19.0                                ...           a year ago
  • 1.18.1                                ...           a year ago
  • 1.18.0                                ...           a year ago
  • 1.17.4                                ...           a year ago
  • 1.17.3                                ...           a year ago
  • 1.17.2                                ...           a year ago
  • 1.17.1                                ...           a year ago
  • 1.17.0                                ...           a year ago
  • 1.16.5                                ...           a year ago
  • 1.16.4                                ...           a year ago
  • 1.16.3                                ...           a year ago
  • 1.16.2                                ...           a year ago
  • 1.16.1                                ...           a year ago
  • 1.16.0                                ...           a year ago
  • 1.15.0                                ...           a year ago
  • 1.14.0                                ...           a year ago
  • 1.13.1                                ...           a year ago
  • 1.13.0                                ...           a year ago
  • 1.12.0                                ...           a year ago
  • 1.11.0                                ...           a year ago
  • 1.10.0                                ...           a year ago
  • 1.9.0                                ...           a year ago
  • 1.8.0                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.1                                ...           a year ago
  • 1.6.0                                ...           a year 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 1
Dependencies (0)
None
Dev Dependencies (57)
Dependents (1)

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