Socket
Socket
Sign inDemoInstall

uglify-js

Package Overview
Dependencies
Maintainers
0
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify-js - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

27

lib/parse-js.js

@@ -1060,7 +1060,2 @@ /***********************************************************************

}
if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) {
return make_unary("unary-prefix",
prog1(S.token.value, next),
expr_atom(allow_calls));
}
if (is("punc")) {

@@ -1166,9 +1161,19 @@ switch (S.token.value) {

}
if (allow_calls && is("operator") && HOP(UNARY_POSTFIX, S.token.value)) {
return prog1(curry(make_unary, "unary-postfix", S.token.value, expr),
next);
}
return expr;
};
function maybe_unary(allow_calls) {
if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) {
return make_unary("unary-prefix",
prog1(S.token.value, next),
maybe_unary(allow_calls));
}
var val = expr_atom(allow_calls);
while (is("operator") && HOP(UNARY_POSTFIX, S.token.value) && !S.token.nlb) {
val = make_unary("unary-postfix", S.token.value, val);
next();
}
return val;
};
function make_unary(tag, op, expr) {

@@ -1186,3 +1191,3 @@ if ((op == "++" || op == "--") && !is_assignable(expr))

next();
var right = expr_op(expr_atom(true), prec, no_in);
var right = expr_op(maybe_unary(true), prec, no_in);
return expr_op(as("binary", op, left, right), min_prec, no_in);

@@ -1194,3 +1199,3 @@ }

function expr_ops(no_in) {
return expr_op(expr_atom(true), 0, no_in);
return expr_op(maybe_unary(true), 0, no_in);
};

@@ -1197,0 +1202,0 @@

@@ -10,3 +10,3 @@ {

"version" : "1.0.4",
"version" : "1.0.5",

@@ -13,0 +13,0 @@ "main" : "./uglify-js.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc