aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/compress.js10
-rw-r--r--test/compress/conditionals.js2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/compress.js b/lib/compress.js
index d790a284..41578c14 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -54,13 +54,13 @@ function Compressor(options, false_by_default) {
drop_debugger : !false_by_default,
unsafe : !false_by_default,
conditionals : !false_by_default,
- comparations : !false_by_default,
+ comparisons : !false_by_default,
evaluate : !false_by_default,
booleans : !false_by_default,
loops : !false_by_default,
unused : !false_by_default,
hoist_funs : !false_by_default,
- hoist_vars : !false_by_default,
+ hoist_vars : false,
if_return : !false_by_default,
join_vars : !false_by_default,
cascade : !false_by_default,
@@ -632,7 +632,7 @@ merge(Compressor.prototype, {
});
def(AST_Binary, function(compressor){
var self = this.clone(), op = this.operator;
- if (compressor.option("comparations") && compressor.option("unsafe")) {
+ if (compressor.option("comparisons") && compressor.option("unsafe")) {
switch (op) {
case "<=" : self.operator = ">" ; return self;
case "<" : self.operator = ">=" ; return self;
@@ -1337,7 +1337,7 @@ merge(Compressor.prototype, {
});
OPT(AST_Binary, function(self, compressor){
- if (compressor.option("comparations")) switch (self.operator) {
+ if (compressor.option("comparisons")) switch (self.operator) {
case "===":
case "!==":
if ((self.left.is_string() && self.right.is_string()) ||
@@ -1415,7 +1415,7 @@ merge(Compressor.prototype, {
if (best_of(exp[0], self) !== self)
return exp[0];
}
- if (compressor.option("comparations")) {
+ if (compressor.option("comparisons")) {
if (!(compressor.parent() instanceof AST_Binary)) {
var negated = make_node(AST_UnaryPrefix, self, {
operator: "!",
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js
index 8edc86e9..bc4624d1 100644
--- a/test/compress/conditionals.js
+++ b/test/compress/conditionals.js
@@ -92,7 +92,7 @@ ifs_5: {
options = {
if_return: true,
conditionals: true,
- comparations: true,
+ comparisons: true,
};
input: {
function f() {