From e1098b04a7e8b3ebd4faf598b2b8b30bceba14d6 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Tue, 2 Oct 2012 12:45:31 +0300 Subject: [PATCH] "use strict"; --- bin/uglifyjs2 | 2 ++ lib/ast.js | 2 ++ lib/compress.js | 2 ++ lib/output.js | 2 ++ lib/parse.js | 2 ++ lib/scope.js | 2 ++ lib/sourcemap.js | 2 ++ lib/transform.js | 2 ++ lib/utils.js | 2 ++ 9 files changed, 18 insertions(+) diff --git a/bin/uglifyjs2 b/bin/uglifyjs2 index dd8a758a..ea82ddfb 100755 --- a/bin/uglifyjs2 +++ b/bin/uglifyjs2 @@ -1,6 +1,8 @@ #! /usr/bin/env node // -*- js -*- +"use strict"; + var UglifyJS = require("../tools/node"); var sys = require("util"); var optimist = require("optimist"); diff --git a/lib/ast.js b/lib/ast.js index c62e1429..185328a1 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + var NODE_HIERARCHY = {}; function DEFNODE(type, props, methods, base) { diff --git a/lib/compress.js b/lib/compress.js index a6edf413..ecd9c955 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + function Compressor(options, false_by_default) { if (!(this instanceof Compressor)) return new Compressor(options, false_by_default); diff --git a/lib/output.js b/lib/output.js index 615f7110..e5531f55 100644 --- a/lib/output.js +++ b/lib/output.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + function OutputStream(options) { options = defaults(options, { diff --git a/lib/parse.js b/lib/parse.js index b054c727..115a42ce 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -42,6 +42,8 @@ ***********************************************************************/ +"use strict"; + var KEYWORDS = array_to_hash([ "break", "case", diff --git a/lib/scope.js b/lib/scope.js index 71ed0667..4166ac25 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + function SymbolDef(scope, orig) { this.name = orig.name; this.orig = [ orig ]; diff --git a/lib/sourcemap.js b/lib/sourcemap.js index da4ab4fe..a9dc6a81 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + // a small wrapper around fitzgen's source-map library function SourceMap(options) { options = defaults(options, { diff --git a/lib/transform.js b/lib/transform.js index 0d15e63f..d85262be 100644 --- a/lib/transform.js +++ b/lib/transform.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + // Tree transformer helpers. // XXX: eventually I should refactor the compressor to use this infrastructure. diff --git a/lib/utils.js b/lib/utils.js index 3b8aa00c..83e514a4 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -41,6 +41,8 @@ ***********************************************************************/ +"use strict"; + function curry(f) { var args = slice(arguments, 1); return function() { return f.apply(this, args.concat(slice(arguments))); }; -- 2.34.1