uglify-js
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -354,3 +354,5 @@ /*********************************************************************** | ||
stream.push_node(self); | ||
if (force_parens || self.needs_parens(stream)) { | ||
var needs_parens = self.needs_parens(stream); | ||
var fc = self instanceof AST_Function && !stream.option("beautify"); | ||
if (force_parens || (needs_parens && !fc)) { | ||
stream.with_parens(function(){ | ||
@@ -363,2 +365,3 @@ self.add_comments(stream); | ||
self.add_comments(stream); | ||
if (needs_parens && fc) stream.print("!"); | ||
self.add_source_map(stream); | ||
@@ -365,0 +368,0 @@ generator(self, stream); |
@@ -171,3 +171,5 @@ /*********************************************************************** | ||
function is_identifier_string(str){ | ||
for (var i = str.length; --i >= 0;) { | ||
var i = str.length; | ||
if (i == 0) return false; | ||
while (--i >= 0) { | ||
if (!is_identifier_char(str.charAt(i))) | ||
@@ -1342,11 +1344,4 @@ return false; | ||
if (!options.strict) return true; | ||
switch (expr[0]+"") { | ||
case "dot": | ||
case "sub": | ||
case "new": | ||
case "call": | ||
return true; | ||
case "name": | ||
return expr[1] != "this"; | ||
} | ||
if (expr instanceof AST_This) return false; | ||
return (expr instanceof AST_PropAccess || expr instanceof AST_Symbol); | ||
}; | ||
@@ -1353,0 +1348,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"main": "tools/node.js", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"engines": { "node" : ">=0.4.0" }, | ||
@@ -9,0 +9,0 @@ "maintainers": [{ |
@@ -22,2 +22,3 @@ keep_properties: { | ||
a["\u0EB3"] = "unicode"; | ||
a[""] = "whitespace"; | ||
} | ||
@@ -29,2 +30,3 @@ expect: { | ||
a.\u0EB3 = "unicode"; | ||
a[""] = "whitespace"; | ||
} | ||
@@ -43,2 +45,3 @@ } | ||
a["\u0EB3"] = "unicode"; | ||
a[""] = "whitespace"; | ||
} | ||
@@ -50,3 +53,4 @@ expect: { | ||
a.\u0EB3 = "unicode"; | ||
a[""] = "whitespace"; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
332385
8059