v2.14.0
Unminify
- No longer extract sequence from
while (a(), b()) c();
- No longer invert relational operators (
!(a > b);
->a <= b
) due to breaking with NaN - Faster unminify (mainly string merging and numeric expressions)
- Remove double negations:
if (!!a) b();
->if (a) b();
in if, ternary, array.filter - Extract sequence from for-of:
for (let value of (a = 1, array)) {}
->a = 1; for (let value of array) {}
- Mangle: names are inferred based on type (variable, function, parameter, class) and some expressions:
var iîiíiîï = exports;
function iìíïîíï(iïîiïîï, iìíìïîî, iìiiïiî) {
var iïíïíiî = Array(Math.max(iïîiïîï.bitLength(), iìiiïiî) + 1);
iïíïíiî.fill(0);
var iiïiïîï = 1 << iìíìïîî + 1;
var iìîíiîí = iïîiïîï.clone();
->
var vExports = exports;
function f(p, p2, p3) {
var vArray = Array(Math.max(p.bitLength(), p3) + 1);
vArray.fill(0);
var v = 1 << p2 + 1;
var v2 = p.clone();
Transpile
- Fixed default parameters offset issue
- Transpile default parameter with value
true
orfalse
- Transpile default destructuring parameters:
function f() {
let { x, y } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
let [z] = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
}
->
function f({ x, y } = {}, [z] = []) {}
Deobfuscate
- Inline objects like
var obj = ({ x: 1 }).x; decode(obj)
todecode(1)
- Support inlined control flow objects:
({ QuFtJ: function (n, r) { return n === r; }}).QuFtJ(u, v);
->u === v
Playground
CLI
- Added
--no-jsx
,--no-unpack
,--no-deobfuscate
,--no-unminify
arguments
(the playground always has the latest changes, but the npm release was a bit outdated)