Skip to content

Error with es6 destructuring #29

@eltiodelsofa

Description

@eltiodelsofa

Create test.js file with

function foo({bar}) {
  return bar;
}

foo({bar: 'baz'});

$ javascript-obfuscator test.js
$ node test-obfuscated.js

ReferenceError: _0x5c1443 is not defined

_0x5c1443 is bar in original return bar; but foo({bar}) can not be changed.
I think the only solution is with _0x5c1443 = obj.bar;
I am using babel over the obfuscated file to solve the problem

$ node -v
v6.9.4

$ javascript-obfuscator --version
0.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions