Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d04644a
commit 3224778
Showing
6 changed files
with
43 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
(function () { | ||
'use strict'; | ||
'use strict'; | ||
|
||
function foo$1 () { | ||
console.log( 'foo' ); | ||
} | ||
// should remove expressions without side-effect, multiple effects | ||
var a = (foo(), foo(), 2); | ||
// without white-space, effect at the end | ||
var b = (foo()); | ||
|
||
// should only keep final expression | ||
var d = (2); | ||
console.log(d); | ||
// should remove expressions without side-effect, multiple effects | ||
var a = (foo(), foo(), 2); | ||
// without white-space, effect at the end | ||
var b = (foo()); | ||
|
||
// should infer value | ||
// should keep f import | ||
var e = (foo$1()); | ||
// should only keep final expression | ||
var d = (2); | ||
console.log(d); | ||
|
||
// should infer value | ||
// should keep f import | ||
var e = (foo$1()); | ||
|
||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(factory()); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(factory()); | ||
}(this, (function () { 'use strict'; | ||
|
||
function foo$1 () { | ||
console.log( 'foo' ); | ||
} | ||
// should remove expressions without side-effect, multiple effects | ||
var a = (foo(), foo(), 2); | ||
// without white-space, effect at the end | ||
var b = (foo()); | ||
|
||
// should only keep final expression | ||
var d = (2); | ||
console.log(d); | ||
// should remove expressions without side-effect, multiple effects | ||
var a = (foo(), foo(), 2); | ||
// without white-space, effect at the end | ||
var b = (foo()); | ||
|
||
// should infer value | ||
// should keep f import | ||
var e = (foo$1()); | ||
// should only keep final expression | ||
var d = (2); | ||
console.log(d); | ||
|
||
// should infer value | ||
// should keep f import | ||
var e = (foo$1()); | ||
|
||
}))); |