From 252fc65558e40e5e0a451f8fe3f2d5ae7a639457 Mon Sep 17 00:00:00 2001 From: thorn0 Date: Sat, 18 Jan 2014 15:16:43 +0200 Subject: [PATCH] Advanced way to specify if a function call might have side effects. #400 --- lib/compress.js | 1 + 1 file changed, 1 insertion(+) 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; }); -- 2.34.1