Skip to content

Commit

Permalink
feature: @putout/minify: merge-variables: void 0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 9, 2024
1 parent be4f943 commit 233ff51
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/fixture/for-of-nested-fix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/fixture/void-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const{isArray:a}=Array;function b(e){return a(e)}var c;console.log({DEV:c,on:b});
7 changes: 7 additions & 0 deletions test/fixture/void.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function on(e) {
const r = Array.isArray(e);
return r;
}
const DEV = void 0;

console.log({DEV, on});
5 changes: 5 additions & 0 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ test('@putout/minify: merge-destructuring-properties', (t) => {
t.end();
});

test('@putout/minify: void', (t) => {
t.minify('void');
t.end();
});

test('@putout/minify: undefined', (t) => {
t.minify('undefined');
t.end();
Expand Down

0 comments on commit 233ff51

Please sign in to comment.