4 ms·
While the virtues of semicolon insertion are highly debatable, developers are permitted by the ECMAScript standard to write code that relies on it. A tool like
by groovy2shoes 15y ago
While the virtues of semicolon insertion are highly debatable, developers are permitted by the ECMAScript standard to write code that relies on it. A tool like JSMin should be aware of semicolon insertion. ricardobeat put it very well elsewhere in this thread: "It is a bug on JSMin. Minifying should never alter code behaviour."
- ars 15y agoActually JSMin is aware of semicolon insertion and handles it correctly. They just disagree on whether a semicolon gets inserted here.
- groovy2shoes 15y agoUnfortunately for JSMin, browsers attempt to implement at least the ECMAScript specification, not just "the good parts."
- deleted 15y ago[deleted]