diff options
| author | Igor Minar | 2011-07-17 01:05:43 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-07-18 12:12:55 -0700 |
| commit | fe5240732d0a80b8717be77b31d51dc3c4d737fd (patch) | |
| tree | 10ae66804417087e53df8df657de5f00ff888293 /src | |
| parent | b98c23274b4dd51205d5020a254ac53966c9ae9a (diff) | |
| download | angular.js-fe5240732d0a80b8717be77b31d51dc3c4d737fd.tar.bz2 | |
feat(strict mode): adding strict mode flag to all js files
the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd
the following script was used to modify all files:
for file in `find src test -name "*.js"`; do
echo -e "'use strict';\n" > temp.txt
cat $file >> temp.txt
mv temp.txt $file
done
Diffstat (limited to 'src')
52 files changed, 104 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js index 295be998..7d31330e 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1,3 +1,5 @@ +'use strict'; + //////////////////////////////////// if (typeof document.getAttribute == $undefined) diff --git a/src/AngularPublic.js b/src/AngularPublic.js index 37e0a082..ebd54621 100644 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -1,3 +1,5 @@ +'use strict'; + var browserSingleton; /** * @workInProgress diff --git a/src/Browser.js b/src/Browser.js index 61396bd1..3e120e5b 100644 --- a/src/Browser.js +++ b/src/Browser.js @@ -1,3 +1,5 @@ +'use strict'; + ////////////////////////////// // Browser ////////////////////////////// diff --git a/src/Compiler.js b/src/Compiler.js index 3036d5d6..b76eb3d6 100644 --- a/src/Compiler.js +++ b/src/Compiler.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Template provides directions an how to bind to a given element. * It contains a list of init functions which need to be called to diff --git a/src/Injector.js b/src/Injector.js index 2b692aaf..d2bafcf5 100644 --- a/src/Injector.js +++ b/src/Injector.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @ngdoc function * @name angular.injector diff --git a/src/JSON.js b/src/JSON.js index 942ce7c0..0a826e0e 100644 --- a/src/JSON.js +++ b/src/JSON.js @@ -1,3 +1,5 @@ +'use strict'; + var array = [].constructor; /** diff --git a/src/Resource.js b/src/Resource.js index d9121794..5462826d 100644 --- a/src/Resource.js +++ b/src/Resource.js @@ -1,3 +1,5 @@ +'use strict'; + function Route(template, defaults) { diff --git a/src/Scope.js b/src/Scope.js index a63cb8f7..b530bbc5 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -1,3 +1,5 @@ +'use strict'; + function getter(instance, path, unboundFn) { if (!path) return instance; var element = path.split('.'); diff --git a/src/angular-bootstrap.js b/src/angular-bootstrap.js index 78f1e3c1..0e98c298 100644 --- a/src/angular-bootstrap.js +++ b/src/angular-bootstrap.js @@ -1,3 +1,5 @@ +'use strict'; + /** * The MIT License * diff --git a/src/angular-mocks.js b/src/angular-mocks.js index 2590c122..a4941288 100644 --- a/src/angular-mocks.js +++ b/src/angular-mocks.js @@ -1,3 +1,5 @@ +'use strict'; + /** * The MIT License * diff --git a/src/apis.js b/src/apis.js index 4e2cca0b..3ccd95d7 100644 --- a/src/apis.js +++ b/src/apis.js @@ -1,3 +1,5 @@ +'use strict'; + var angularGlobal = { 'typeOf':function(obj){ if (obj === null) return $null; diff --git a/src/directives.js b/src/directives.js index 2949269b..6fc19eaf 100644 --- a/src/directives.js +++ b/src/directives.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview diff --git a/src/filters.js b/src/filters.js index f2cff14d..1dd6322b 100644 --- a/src/filters.js +++ b/src/filters.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview diff --git a/src/formatters.js b/src/formatters.js index db7668b3..daa3bd29 100644 --- a/src/formatters.js +++ b/src/formatters.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview diff --git a/src/jqLite.js b/src/jqLite.js index 9fdb31dc..1e81a1f4 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -1,3 +1,5 @@ +'use strict'; + ////////////////////////////////// //JQLite ////////////////////////////////// diff --git a/src/jstd-scenario-adapter/Adapter.js b/src/jstd-scenario-adapter/Adapter.js index fd9674e1..9e9cc2ec 100644 --- a/src/jstd-scenario-adapter/Adapter.js +++ b/src/jstd-scenario-adapter/Adapter.js @@ -1,3 +1,5 @@ +'use strict'; + /** * JSTestDriver adapter for angular scenario tests * diff --git a/src/markups.js b/src/markups.js index 329c8263..573ec706 100644 --- a/src/markups.js +++ b/src/markups.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview diff --git a/src/parser.js b/src/parser.js index 541addc4..73733d48 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1,3 +1,5 @@ +'use strict'; + var OPERATORS = { 'null':function(self){return null;}, 'true':function(self){return true;}, diff --git a/src/sanitizer.js b/src/sanitizer.js index 2cf126dc..da629c7a 100644 --- a/src/sanitizer.js +++ b/src/sanitizer.js @@ -1,3 +1,5 @@ +'use strict'; + /* * HTML Parser By Misko Hevery (misko@hevery.com) * based on: HTML Parser By John Resig (ejohn.org) diff --git a/src/scenario/Application.js b/src/scenario/Application.js index 1c87c5a0..24f5a8c4 100644 --- a/src/scenario/Application.js +++ b/src/scenario/Application.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Represents the application currently being tested and abstracts usage * of iframes or separate windows. diff --git a/src/scenario/Describe.js b/src/scenario/Describe.js index c6484f2f..45a5aa63 100644 --- a/src/scenario/Describe.js +++ b/src/scenario/Describe.js @@ -1,3 +1,5 @@ +'use strict'; + /** * The representation of define blocks. Don't used directly, instead use * define() in your tests. diff --git a/src/scenario/Future.js b/src/scenario/Future.js index f545c721..598731fa 100644 --- a/src/scenario/Future.js +++ b/src/scenario/Future.js @@ -1,3 +1,5 @@ +'use strict'; + /** * A future action in a spec. * diff --git a/src/scenario/ObjectModel.js b/src/scenario/ObjectModel.js index bff14461..76e0201a 100644 --- a/src/scenario/ObjectModel.js +++ b/src/scenario/ObjectModel.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Maintains an object tree from the runner events. * diff --git a/src/scenario/Runner.js b/src/scenario/Runner.js index 51a81d6a..eb9d0320 100644 --- a/src/scenario/Runner.js +++ b/src/scenario/Runner.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Runner for scenarios * diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js index 6879d787..8f34e6c1 100644 --- a/src/scenario/Scenario.js +++ b/src/scenario/Scenario.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Setup file for the Scenario. diff --git a/src/scenario/SpecRunner.js b/src/scenario/SpecRunner.js index 868c692d..0d6274a4 100644 --- a/src/scenario/SpecRunner.js +++ b/src/scenario/SpecRunner.js @@ -1,3 +1,5 @@ +'use strict'; + /** * This class is the "this" of the it/beforeEach/afterEach method. * Responsibilities: diff --git a/src/scenario/angular-bootstrap.js b/src/scenario/angular-bootstrap.js index 264ce718..1852e479 100644 --- a/src/scenario/angular-bootstrap.js +++ b/src/scenario/angular-bootstrap.js @@ -1,3 +1,5 @@ +'use strict'; + (function(previousOnLoad){ var prefix = (function(){ var filename = /(.*\/)angular-bootstrap.js(#(.*))?/; diff --git a/src/scenario/dsl.js b/src/scenario/dsl.js index 60b05cd6..b4788ad9 100644 --- a/src/scenario/dsl.js +++ b/src/scenario/dsl.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Shared DSL statements that are useful to all scenarios. */ diff --git a/src/scenario/matchers.js b/src/scenario/matchers.js index 8ef154e9..183dce46 100644 --- a/src/scenario/matchers.js +++ b/src/scenario/matchers.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Matchers for implementing specs. Follows the Jasmine spec conventions. */ diff --git a/src/scenario/output/Html.js b/src/scenario/output/Html.js index c1b15239..2098f214 100644 --- a/src/scenario/output/Html.js +++ b/src/scenario/output/Html.js @@ -1,3 +1,5 @@ +'use strict'; + /** * User Interface for the Scenario Runner. * diff --git a/src/scenario/output/Json.js b/src/scenario/output/Json.js index 1e3bef6b..c024d923 100644 --- a/src/scenario/output/Json.js +++ b/src/scenario/output/Json.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Generates JSON output into a context. */ diff --git a/src/scenario/output/Object.js b/src/scenario/output/Object.js index 1f29af9c..621b816f 100644 --- a/src/scenario/output/Object.js +++ b/src/scenario/output/Object.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Creates a global value $result with the result of the runner. */ diff --git a/src/scenario/output/Xml.js b/src/scenario/output/Xml.js index 1a4c362c..9a2071b9 100644 --- a/src/scenario/output/Xml.js +++ b/src/scenario/output/Xml.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Generates XML output into a context. */ diff --git a/src/service/cookieStore.js b/src/service/cookieStore.js index 089e4578..facce284 100644 --- a/src/service/cookieStore.js +++ b/src/service/cookieStore.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/cookies.js b/src/service/cookies.js index 86e55fc1..d6be1364 100644 --- a/src/service/cookies.js +++ b/src/service/cookies.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/defer.js b/src/service/defer.js index 39023fba..551e8bc9 100644 --- a/src/service/defer.js +++ b/src/service/defer.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/document.js b/src/service/document.js index fe8670c6..37a5bba2 100644 --- a/src/service/document.js +++ b/src/service/document.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/exceptionHandler.js b/src/service/exceptionHandler.js index 798c9610..aa4eed47 100644 --- a/src/service/exceptionHandler.js +++ b/src/service/exceptionHandler.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/hover.js b/src/service/hover.js index fca18130..f8470370 100644 --- a/src/service/hover.js +++ b/src/service/hover.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/invalidWidgets.js b/src/service/invalidWidgets.js index 87c15f0d..b7ef0b53 100644 --- a/src/service/invalidWidgets.js +++ b/src/service/invalidWidgets.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/location.js b/src/service/location.js index f03dc009..1889266e 100644 --- a/src/service/location.js +++ b/src/service/location.js @@ -1,3 +1,5 @@ +'use strict'; + var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/, HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/, DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21}; diff --git a/src/service/log.js b/src/service/log.js index 54265096..b4d33bc9 100644 --- a/src/service/log.js +++ b/src/service/log.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/resource.js b/src/service/resource.js index 3cb7b6e8..31d7ceeb 100644 --- a/src/service/resource.js +++ b/src/service/resource.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/route.js b/src/service/route.js index b04c5ebb..9534968a 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/updateView.js b/src/service/updateView.js index 2e93e91c..d504772c 100644 --- a/src/service/updateView.js +++ b/src/service/updateView.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/window.js b/src/service/window.js index 6c234e81..2f3f677a 100644 --- a/src/service/window.js +++ b/src/service/window.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/xhr.bulk.js b/src/service/xhr.bulk.js index c6cf608c..c0940d9d 100644 --- a/src/service/xhr.bulk.js +++ b/src/service/xhr.bulk.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/xhr.cache.js b/src/service/xhr.cache.js index c6066a5c..42b666e1 100644 --- a/src/service/xhr.cache.js +++ b/src/service/xhr.cache.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/xhr.error.js b/src/service/xhr.error.js index 7f8e4a19..5dd7983b 100644 --- a/src/service/xhr.error.js +++ b/src/service/xhr.error.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/service/xhr.js b/src/service/xhr.js index d26cda42..5fc5223e 100644 --- a/src/service/xhr.js +++ b/src/service/xhr.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc service diff --git a/src/validators.js b/src/validators.js index 4f5c48bd..9a2a02de 100644 --- a/src/validators.js +++ b/src/validators.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview diff --git a/src/widgets.js b/src/widgets.js index db39e783..f6de5f96 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -1,3 +1,5 @@ +'use strict'; + /** * @workInProgress * @ngdoc overview |
