For a full comparison of minifiers, jump to https://methodfish.com/Articles/minifiers

Rodrigo54

This is a demonstration of the javascript minifier using Rodrigo54 class

Input javascript:

Output:

/*!
 * This is an important comment
 * Date: 27-27
 */var _var1=123;var _var2='abc';const _CONST1=1234;const _CONST2=9876;let _let1=123;let _let2=987;function getElemInfo(elem){var localvar1=123;var localvar2=345;let locallet1='abc';let locallet2='def';const localconst3=true;const localconst4=false;var test=locallet2.replace(/'/,'abc');//if ( elem==undefined ) msg=''; // '<hr>';var c=99;// and / and// and //
    if(elem==false){return 'NULL'}if(elem==window){return 'window'}var newTx='';if(elem.tagName){newTx=newTx+'tag='+elem.tagName}if(elem.id){newTx=newTx+'id='+elem.id}if(elem.className){newTx=newTx+'class='+elem.className}if(localconst3)console.log('localconst3=true');else console.log('localconst3=false');if(1==2)console.log('1==2');else{console.log(`1<>2`)}doSomething('Lorem Ipsum
    doSomething("Lorem \"Ipsum\" // Delor */");
    
    let myPet ='seahorse';
    console.log('My favorite animal is the ${myPet};.');return newTx}

Minify time: 0.0007 seconds; 946 bytes 70.54% of original size (from 1341 bytes).