Haywired ?
See original GitHub issueGoogle closure-compiler goes a bit haywire for stuff like this :
input :
const SomeFunc = (i,k,x) => i * i + k * x
console.log(someFunc(2))
someFunc(3)
someFunc(10)
someFunc(21)
someFunc(123)
someFunc(12314)
someFunc(123144)
Output :
console.log(someFunc(2));someFunc(3);someFunc(10);someFunc(21);someFunc(123);someFunc(12314);someFunc(123144);
The only happens when I run this on advanced optimization
On a side note : ES5+ is not supported even though we are now well on our way to ES9 ? (Kindly implement some basic ES6 functionalities).
For now this happens :
const xyz = () => // the whole code you know what
compiles to
var xyz = function() {};
Similarly spread operators , string literals or any other ES5+ functionality is not supported at all.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
HayWired Scenario | U.S. Geological Survey - USGS.gov
The HayWired scenario depicts a scientifically realistic earthquake sequence, and its cascading impacts, that all starts with a magnitude 7 ...
Read more >HayWired | U.S. Geological Survey - USGS.gov
The HayWired scenario examines a hypothetical earthquake (mainshock) with a moment magnitude of 7.0 occurring on April 18, 2018, at 4:18 p.m. on...
Read more >The HayWired Earthquake Scenario: How We Can Outsmart ...
The name HayWired speaks to the threat of earthquakes on the Hayward Fault and to the vulnerabilities and strengths posed by the ...
Read more >Meaning of haywire in English - Cambridge Dictionary
haywire meaning: 1. to stop working, often in a way that is very sudden and noticeable: 2. to stop working, often…. Learn more....
Read more >The Haywired Scenario Exercise Toolkit will be available soon!
The USGS HayWired Earthquake Scenario explores the physical, technological, and societal impacts of a hypothetical magnitude-7.0 earthquake on the Hayward ...
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
It’s not about Closure, it’s just JS. Identifiers are case sensitive.
Closure sees that you do not use
SomeFunc
, so it removes it. It analyzes the code and in order to minify is properly it has to be correct JavaScript. It’s done exactly what it was supposed to do in your example.