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

improve compress granularity through typeofs #2201

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

alexlamsl
Copy link
Collaborator

fixes #2198

README.md Outdated
@@ -644,6 +644,9 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `booleans` -- various optimizations for boolean context, for example `!!a
? b : c → a ? b : c`

- `typeofs` -- `typeof foo == "undefined"` → `foo === void 0`
Copy link
Contributor

@kzc kzc Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • typeofs -- default true. Transforms typeof foo == "undefined" into foo === void 0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated
@@ -644,6 +644,9 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `booleans` -- various optimizations for boolean context, for example `!!a
? b : c → a ? b : c`

- `typeofs` -- `typeof foo == "undefined"` → `foo === void 0`
Note: Internet Explorer 10 or below has known issue with special values of `foo`.
Copy link
Contributor

@kzc kzc Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: recommend to set this value to false for IE10 and earlier versions due to known issues.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kzc
Copy link
Contributor

kzc commented Jul 5, 2017

LGTM

@alexlamsl alexlamsl merged commit 1ac25fc into mishoo:master Jul 5, 2017
@alexlamsl alexlamsl deleted the issue-2198 branch July 5, 2017 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typeof changed even when "unsafe" is false
2 participants