Skip to content
Myr

Using Collection internally

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

authored by visionmedia · committed by visionmedia · parent 7d36c6a · Browse files · 2 files+12 added−9 removed
This commit

State

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

Diff stats

2 files+12 added−9 removed

  • other:+12 added−9 removed

2 files+12 added−9 removed

modified:lib/express/core.js+8 added-5 removed
144 unmodified lines
145 * @api private146 */147 148 matchingRoute: function(){149 for (var i = 0, len = Express.routes.length; i < len; ++i)150 if (this.match(Express.routes[i]))151 return Express.routes[i]149 var self = this150 return $(Express.routes).find(function(route){151 return self.match(route)152 })153 },154 155 /**156 * Check if _route_ matches the current request.
20 unmodified lines
177 * @api private178 */179 180 mapParams: function(route) {180 for (var i = 0, len = route.keys.length; i < len; ++i)181 this.params[route.keys[i]] = this.captures[i+1]181 var self = this182 $(route.keys).each(function(key, i){183 self.params[key] = self.captures[++i]184 })185 }186})187188// --- Server
93 unmodified lines
modified:lib/express/helpers.js+4 added-4 removed
251 unmodified lines
252 * @api public253 */254255exports.parseParams = function(string) {256 var params = {}, pairs = string.split('&'), pair257 for (var i = 0, len = pairs.length; i < len; ++i)258 pair = pairs[i].split('='),256 return parseNestedParams($(string.split('&')).reduce({}, function(params, pair){257 pair = pair.split('=')258 params[pair[0]] = pair[1]260 return parseNestedParams(params)259 return params260 }))261}262263/**264 * Set Content-Type header to the mime type
10 unmodified lines