Object initializer with computed property names does not work
See original GitHub issueHi, everyone. I found that this obfuscator breaks the following code.
in.js:
const key = 'bar';
const obj = {
[key]: 1
};
console.log(obj);
$ node in.js
{ bar: 1 }
$
$ javascript-obfuscator in.js --output out.js
$ node out.js
{ key: 1 }
Could you fix it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Object initializer - JavaScript - MDN Web Docs - Mozilla
An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, ...
Read more >Initialize a JavaScript/TypeScript object with computed ...
I'm trying to initialize a JavaScript/TypeScript object with computed property names from an enum (or, from the values of an array).
Read more >Object initializer - Javascript
An object initializer is a list of zero or more pairs of property names and associated values of an object, enclosed in curly...
Read more >Object initializer - JavaScript - UDN Web Docs: MDN Backup
An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in...
Read more >ES6 Computed Properties · Issue #1082
All computed names must be of type string, number, or any (or eventually symbol); No property will be added to the containing type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in
javascript-obfuscator@0.11.2
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.