question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deadCodeInjection: true causes error SyntaxError: function statement not allowed

See original GitHub issue

When deadCodeInjection enabled:

if (_0x5abbc0[_0x58af('0x18a', 'Mg$V')](_0x5abbc0[_0x58af('0x18b', 'TB25')], _0x5abbc0[_0x58af('0x18c', 'gyn0')])) {
                throw new TypeError(_0x4c3a6f[_0x58af('0x18d', '3dd^')]);
            } else {
----->       function _0x556570(_0x2b416c, _0x3ba7ab, _0x5148c6) {
                    var _0x2b0d32 = _0x4c3a6f[_0x58af('0x18e', 'WFsi')][_0x58af('0x18f', 'VjCx')]('|');
                    var _0x21f712 = 0x0;
                    while (!![]) {
                        switch (_0x2b0d32[_0x21f712++]) {

I think that it is caused by ‘use strict’ statement

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Jan 15, 2020

Nice. Will look into that in the next few days

0reactions
sanex3339commented, Jul 3, 2020

Released as 1.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: function statement requires a name - JavaScript
The JavaScript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name.
Read more >
What is the "Function statement requires a name" syntax ...
It is thrown when the JavaScript engine encounters tokens or a token order that does not conform to the syntax of the language...
Read more >
javascript-obfuscator | Yarn - Package Manager
Obfuscation of single input file with .js extension. If the destination path is not specified with the --output option, the obfuscated file will...
Read more >
JavaScript SyntaxError - Function statement requires a name
Cause of Error: Any function statement in the code that needs a name. ... the function name is provided, So the error has...
Read more >
javascript-obfuscator/CHANGELOG.md
85, * Fixed runtime errors in large obfuscated code when both `rc4` and ... body of arrow function expression when `transformObjectKeys` option is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found