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

Update babel-plugin-minify-simplify package documentation #321

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/babel-plugin-minify-simplify/README.md
Expand Up @@ -4,7 +4,8 @@ This plugin will transform code in mainly two ways:

1. Reduce as much statements as possible into expressions

**In**
## In

```js
function foo() {
if (x) a();
Expand All @@ -15,7 +16,8 @@ function foo2() {
}
```

**Out**
## Out

```js
function foo() {
x && a();
Expand All @@ -27,14 +29,16 @@ function foo2() {

2. Make expressions as uniform as possible for better compressibility

**In**
## In

```js
undefined
foo['bar']
Number(foo)
```

**Out**
## Out

```js
void 0
foo.bar
Expand Down