We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use esmangle in NodeJS to compress following js:
function f(){ return function *(next){ var prev = next; prev = f.call(this, prev); yield *prev; }; }
I get the result as:
function f(){return function*(b){var a=b;a=f.call(this,a),yield*prev}}
The (last one) prev in source doesn't be mangled.
Compressor code in NodeJS:
var esprima = require('esprima'); var esmangle = require('esmangle'); var escodegen = require('escodegen'); var ast = esprima.parse(code); // Get optimized AST var optimized = esmangle.optimize(ast, null); // gets mangled AST var result = esmangle.mangle(optimized); console.log(escodegen.generate(result, { format: { renumber: true, hexadecimal: true, escapeless: true, compact: true, semicolons: false, parentheses: false } })); // dump AST
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I use esmangle in NodeJS to compress following js:
I get the result as:
The (last one) prev in source doesn't be mangled.
Compressor code in NodeJS:
The text was updated successfully, but these errors were encountered: