Decent Mess Up
Want to understand my js? No way!
Demo
Input:
const str="abc";{ const obj={}; objproperty= key1:'value1' 'key2':str 'key'+3:'value3' console; };
Output:
const _a = 'vcb3aotkleyr21ugp';const _b = 'bcktuovea2grp1y3l';const _c = 'yecauop3rkbltg2v1';const str = _a4 + _b0 + _a1; { const _a2 = _b; const _b2 = _a; const _c2 = _c; const obj = {}; obj_a212 + _c28 + _c25 + _a212 + _b29 + _c28 + _b26 + _a214 = _b27 + _b29 + _a214 + _b213: _c215 + _c23 + _a216 + _b214 + _c21 + _a213 _a22 + _c21 + _b210 + _a29: str _c29 + _a27 + _a214 + 3: _c215 + _c23 + _c211 + _b214 + _a27 + _a215 ; console_a216 + _c25 + _b215obj;};
Install
npm i -D decent-messup
Usage
Use it before babel and uglifying. Using it with uglifier is highly recommended.
const messup=;;
Use with Webpack
module: loaders: test: /\.jsx?$/ loader: 'decent-messup/loader' query: headCnt:5 es6:true test: /\.jsx?$/ loader: 'babel-loader' query: presets: 'latest' 'stage-0' plugins:
Use with Gulp
const transform = ;const messup = ;gulp;
Options
The default options are:
headCnt: 3 es6:false
headCnt
The count of string variables in each function scope.
headCnt=1:
var _a = '31olg2';console_a3 + _a2 + _a4_a1 + _a5 + _a0;
headCnt=3:
var _a = 'l1go23';var _b = '13gol2';var _c = '23og1l';console_b4 + _b3 + _b2_b0 + _b5 + _b1;
es6
Indicates if it should output es6 code.
Input:
a=b:'c'
es6=false:
var _a = 'c';var _b = 'c';var _c = 'c';a = b: _c0 ;
es6=true:
const _a = 'cb';const _b = 'bc';const _c = 'bc';a = _b0: _b1 ;