diff options
| author | Igor Minar | 2011-03-26 16:06:38 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-03-26 23:19:04 -0700 | 
| commit | 1e59822df7366094dbf38b0c4ce0cc979258ad19 (patch) | |
| tree | f171a959e390bda54988369eb634dfd5dc73e30a /src/service | |
| parent | d95a6925cdb5e8009b11fe3ce6dcc8d579bb4234 (diff) | |
| download | angular.js-1e59822df7366094dbf38b0c4ce0cc979258ad19.tar.bz2 | |
remove _null and _undefined
they have no significant effect on minified and gziped size. in fact
they make things worse.
file        | before     | after removal
----------------------------------------
concat      | 325415     | 325297
min         | 62070      | 62161
min + gzip  | 25187      | 25176
The bottom line is that we are getting 0.05% decrease in size after
gzip without all of the hassle of using underscores everywhere.
Diffstat (limited to 'src/service')
| -rw-r--r-- | src/service/cookies.js | 2 | ||||
| -rw-r--r-- | src/service/hover.js | 2 | ||||
| -rw-r--r-- | src/service/location.js | 4 | ||||
| -rw-r--r-- | src/service/route.js | 6 | ||||
| -rw-r--r-- | src/service/xhr.bulk.js | 2 | ||||
| -rw-r--r-- | src/service/xhr.cache.js | 2 | ||||
| -rw-r--r-- | src/service/xhr.js | 2 | 
7 files changed, 10 insertions, 10 deletions
diff --git a/src/service/cookies.js b/src/service/cookies.js index b8de81c2..86e55fc1 100644 --- a/src/service/cookies.js +++ b/src/service/cookies.js @@ -52,7 +52,7 @@ angularServiceInject('$cookies', function($browser) {      //delete any cookies deleted in $cookies      for (name in lastCookies) {        if (isUndefined(cookies[name])) { -        $browser.cookies(name, _undefined); +        $browser.cookies(name, undefined);        }      } diff --git a/src/service/hover.js b/src/service/hover.js index a7cef71a..fca18130 100644 --- a/src/service/hover.js +++ b/src/service/hover.js @@ -50,7 +50,7 @@ angularServiceInject("$hover", function(browser, document) {        }      } else if (tooltip) {        tooltip.callout.remove(); -      tooltip = _null; +      tooltip = null;      }    });  }, ['$browser', '$document'], true); diff --git a/src/service/location.js b/src/service/location.js index 31323284..a5875b72 100644 --- a/src/service/location.js +++ b/src/service/location.js @@ -199,7 +199,7 @@ angularServiceInject("$location", function($browser) {     */    function composeHref(loc) {      var url = toKeyValue(loc.search); -    var port = (loc.port == DEFAULT_PORTS[loc.protocol] ? _null : loc.port); +    var port = (loc.port == DEFAULT_PORTS[loc.protocol] ? null : loc.port);      return loc.protocol  + '://' + loc.host +            (port ? ':' + port : '') + loc.path + @@ -233,7 +233,7 @@ angularServiceInject("$location", function($browser) {        loc.href = href.replace(/#$/, '');        loc.protocol = match[1];        loc.host = match[3] || ''; -      loc.port = match[5] || DEFAULT_PORTS[loc.protocol] || _null; +      loc.port = match[5] || DEFAULT_PORTS[loc.protocol] || null;        loc.path = match[6] || '';        loc.search = parseKeyValue(match[8]);        loc.hash = match[10] || ''; diff --git a/src/service/route.js b/src/service/route.js index 2de484f6..19fc81bf 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -196,14 +196,14 @@ angularServiceInject('$route', function(location, $updateView) {        });        if (dstName) this.$set(dstName, dst);      } -    return match ? dst : _null; +    return match ? dst : null;    }    function updateRoute(){      var childScope, routeParams, pathParams, segmentMatch, key, redir; -    $route.current = _null; +    $route.current = null;      forEach(routes, function(rParams, rPath) {        if (!pathParams) {          if (pathParams = matcher(location.hashPath, rPath)) { @@ -213,7 +213,7 @@ angularServiceInject('$route', function(location, $updateView) {      });      // "otherwise" fallback -    routeParams = routeParams || routes[_null]; +    routeParams = routeParams || routes[null];      if(routeParams) {        if (routeParams.redirectTo) { diff --git a/src/service/xhr.bulk.js b/src/service/xhr.bulk.js index 9933aa7e..c6cf608c 100644 --- a/src/service/xhr.bulk.js +++ b/src/service/xhr.bulk.js @@ -16,7 +16,7 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){    function bulkXHR(method, url, post, callback) {      if (isFunction(post)) {        callback = post; -      post = _null; +      post = null;      }      var currentQueue;      forEach(bulkXHR.urls, function(queue){ diff --git a/src/service/xhr.cache.js b/src/service/xhr.cache.js index e87b127b..284321d7 100644 --- a/src/service/xhr.cache.js +++ b/src/service/xhr.cache.js @@ -26,7 +26,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $log){    function cache(method, url, post, callback, verifyCache){      if (isFunction(post)) {        callback = post; -      post = _null; +      post = null;      }      if (method == 'GET') {        var data, dataCached; diff --git a/src/service/xhr.js b/src/service/xhr.js index 1de72b22..18f695e6 100644 --- a/src/service/xhr.js +++ b/src/service/xhr.js @@ -129,7 +129,7 @@ angularServiceInject('$xhr', function($browser, $error, $log, $updateView){    return function(method, url, post, callback){      if (isFunction(post)) {        callback = post; -      post = _null; +      post = null;      }      if (post && isObject(post)) {        post = toJson(post);  | 
