Skip to content
New issue

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

Compress n+=1 to ++n #4267

Closed
drathier opened this issue Nov 8, 2020 · 1 comment
Closed

Compress n+=1 to ++n #4267

drathier opened this issue Nov 8, 2020 · 1 comment

Comments

@drathier
Copy link

drathier commented Nov 8, 2020

Feature request

Uglify version (uglifyjs -V)

Whichever version is live at http://lisperator.net/uglifyjs/compress

JavaScript input

n += 1

The uglifyjs CLI command executed or minify() options used.

Defaults at http://lisperator.net/uglifyjs/compress (or all flags enabled, doesn't matter)

JavaScript output or error produced.

n+=1

JavaScript expected output.

++n

Presumably the same should happen for n -= 1 too.

@drathier drathier changed the title Compress n+=1 to n++ Compress n+=1 to ++n Nov 8, 2020
@alexlamsl
Copy link
Collaborator

See #3280 (comment) why this is not always safe to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants