🐊Putout plugin adds support of minifiers used in @putout/minify
and minify
.
npm i @putout/plugin-putout -D
{
"rules": {
"minify/convert-if-to-logical": "on",
"minify/remove-return-undefined": "on",
"minify/mangle-names": "on",
"minify/types": "on"
}
}
Check out in 🐊Putout Editor.
if (a)
console.log('hello');
if (b) {
console.log('hello');
console.log('world');
}
a && console.log('hello');
b && (console.log('hello'), console.log('world'));
const fn = () => {
if (a)
return undefined;
return undefined;
};
const fn = () => {
if (a)
return;
};
Check out in 🐊Putout Editor.
function generate() {
const hello = 'hi';
return hello;
}
function generate() {
const a = 'hi';
return a;
}
Check out in 🐊Putout Editor.
const a = undefined;
const b = true;
const c = false;
const a = void 0;
const b = !0;
const c = !1;
MIT