support exponentiation operator (#4593)

This commit is contained in:
Alex Lam S.L
2021-01-24 21:48:51 +00:00
committed by GitHub
parent a08d42555a
commit 9d23ba0a22
6 changed files with 94 additions and 12 deletions

View File

@@ -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;