Skip to content
Myr

Removed redundant var

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 2eb299b · Browse files · 1 file+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:lib/express.core.js+6 added-6 removed
78 unmodified lines
79 */80 81 hashToArray : function(hash) {82 var array = []83 for (var key in hash)83 for (key in hash)84 if (hash.hasOwnProperty(key))85 array.push([key, hash[key]])86 return array87 },
8 unmodified lines
96 */97 98 arrayToHash : function(array) {99 var hash = {}100 for (var i = 0, len = array.length; i < len; ++i)100 for (i = 0, len = array.length; i < len; ++i)101 hash[array[i][0]] = array[i][1]102 return hash103 },104
39 unmodified lines
144 return this.request.uri.params[key] || defaultValue145 },146 147 parseNestedParams : function(params) {148 for (var key in params)148 for (key in params)149 if (params.hasOwnProperty(key))150 if (parts = key.split('['))151 if (parts.length > 1)152 for (var i = 0, prop = params, len = parts.length; i < len; ++i) {152 for (i = 0, prop = params, len = parts.length; i < len; ++i) {153 if (i == len - 1) {154 var name = parts[i].replace(']', '')155 prop[name] = params[key]156 prop = params, delete params[key]
130 unmodified lines
287 288 callRouteFor : function(request) {289 var route = this.findRouteFor(request) || this.defaultRoute290 if (route.keys)291 for (var i = 0, len = route.keys.length; i < len; ++i) 291 for (i = 0, len = route.keys.length; i < len; ++i) 292 this.request.uri.params[route.keys[i]] = Express.captures[i+1] || null293 return this.eval(Express.contentsOf(route.callback))()294 },295
5 unmodified lines
301 * @api public302 */303 304 findRouteFor : function(request) {305 for (var i = 0, len = this.routes.length; i < len; ++i)305 for (i = 0, len = this.routes.length; i < len; ++i)306 if (this.routeMatches(this.routes[i], request))307 return this.routes[i]308 },309
46 unmodified lines