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
transformObjectKeys: true
Generated variable name should not shadow outer scope variable
Generated variable name might shadow outer scope variable Source code:
[].forEach(a => a === { a: 1 });
Obfuscated code result:
[]['forEach'](aO=>aO===aO);}
See "Minimal working example that will help to reproduce issue"
const JavaScriptObfuscator = require('javascript-obfuscator'); const options = { stringArray: false, identifierNamesGenerator: 'mangled', transformObjectKeys: true, }; const fileContent = ` () => { ${new Array(100).fill(0).map((_, i) => `const var${i} = 1;`).join('\n')} [].forEach(a => a === { a: 1 }); } `; const obfuscationResult = JavaScriptObfuscator.obfuscate(fileContent, options)._obfuscatedCode; console.log(obfuscationResult) const idx = obfuscationResult.indexOf('forEach') + 14; const [a, b] = obfuscationResult.substring(idx, idx + 7).split('==='); console.log(a, b, a === b)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Generated variable name should not shadow outer scope variable
Current Behavior
Generated variable name might shadow outer scope variable
Source code:
Obfuscated code result:
Steps to Reproduce
See "Minimal working example that will help to reproduce issue"
Your Environment
Stack trace
Minimal working example that will help to reproduce issue
The text was updated successfully, but these errors were encountered: