diff options
author | thorn0 <georgii.dolzhykov@stuzo.com> | 2014-01-18 15:16:43 +0200 |
---|---|---|
committer | Richard van Velzen <rvanvelzen@experty.com> | 2015-07-29 14:36:42 +0200 |
commit | 252fc65558e40e5e0a451f8fe3f2d5ae7a639457 (patch) | |
tree | 50ce28459bb74e7e45c78e49b3ac0a2643b3b3b4 /lib/compress.js | |
parent | ba9936a5725f35c3d3452bf3aeba4055de1a1071 (diff) | |
download | tracifyjs-252fc65558e40e5e0a451f8fe3f2d5ae7a639457.tar.gz tracifyjs-252fc65558e40e5e0a451f8fe3f2d5ae7a639457.zip |
Advanced way to specify if a function call might have side effects. #400
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 4c4cf977..401a1c75 100644 --- 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; }); |