From 9d23ba0a22fe3d1561b7860dc3aefadef72a4514 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 24 Jan 2021 21:48:51 +0000 Subject: support exponentiation operator (#4593) --- lib/compress.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index d79c1cce..ac380cf3 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4168,6 +4168,9 @@ merge(Compressor.prototype, { case "<=" : result = left <= right; break; case ">" : result = left > right; break; case ">=" : result = left >= right; break; + case "**": + result = Math.pow(left, right); + break; case "in": if (right && typeof right == "object" && HOP(right, left)) { result = true; -- cgit v1.2.3