diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-24 21:48:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 05:48:51 +0800 |
commit | 9d23ba0a22fe3d1561b7860dc3aefadef72a4514 (patch) | |
tree | 65f50c3437c930692d6ecfb87afcdc357ab4b16a /lib/compress.js | |
parent | a08d42555ac42ad1e9bf4b13f44ac46c5bb2dab4 (diff) | |
download | tracifyjs-9d23ba0a22fe3d1561b7860dc3aefadef72a4514.tar.gz tracifyjs-9d23ba0a22fe3d1561b7860dc3aefadef72a4514.zip |
support exponentiation operator (#4593)
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 3 |
1 files changed, 3 insertions, 0 deletions
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; |