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/parser.js | |
| 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/parser.js')
| -rw-r--r-- | src/parser.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.js b/src/parser.js index a8bd21e4..0a19dad9 100644 --- a/src/parser.js +++ b/src/parser.js @@ -1,5 +1,5 @@ var OPERATORS = { - 'null':function(self){return _null;}, + 'null':function(self){return null;}, 'true':function(self){return true;}, 'false':function(self){return false;}, $undefined:noop, @@ -566,7 +566,7 @@ function parser(text, json){ function (self){ var o = obj(self); var i = indexFn(self); - return (o) ? o[i] : _undefined; + return (o) ? o[i] : undefined; }, { assign:function(self, value){ return obj(self)[indexFn(self)] = value; |
