public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba9936a
)
Advanced way to specify if a function call might have side effects. #400
author
thorn0
<georgii.dolzhykov@stuzo.com>
Sat, 18 Jan 2014 13:16:43 +0000
(15:16 +0200)
committer
Richard van Velzen
<rvanvelzen@experty.com>
Wed, 29 Jul 2015 12:36:42 +0000
(14:36 +0200)
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
4c4cf97
..
401a1c7
100644
(file)
--- a/
lib/compress.js
+++ b/
lib/compress.js
@@
-896,6
+896,7
@@
merge(Compressor.prototype, {
def(AST_Call, function(compressor){
var pure = compressor.option("pure_funcs");
if (!pure) return true;
+ if (typeof pure == "function") return pure(this);
return pure.indexOf(this.expression.print_to_string()) < 0;
});