Skip to content
Myr

Renamed params -> keys now that ext.js is fixed

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

authored by visionmedia · committed by visionmedia · parent 575d5e8 · Browse files · 1 file+4 added−4 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+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:lib/express/core.js+4 added-4 removed
66 unmodified lines
67 */6869 normalize: function(path) {70 var self = this71 this.params = []71 this.keys = []72 if (path instanceof RegExp) return path73 return new RegExp('^' + RegExp.escape(normalizePath(path), '.')74 .replace(/\*/g, '(.+)')75 .replace(/(\/|\\\.):(\w+)\?/g, function(_, c, key){76 self.params.push(key)76 self.keys.push(key)77 return '(?:' + c + '([^\/]+))?'78 })79 .replace(/:(\w+)/g, function(_, key){80 self.params.push(key)80 self.keys.push(key)81 return '([^\/]+)'82 }) + '$', 'i')83 }84})
68 unmodified lines
153 * @api private154 */155 156 mapParams: function(route) {157 route.params.each(function(key, i){157 route.keys.each(function(key, i){158 this.request.params.path[key] = this.request.captures[++i]159 }, this)160 }161})
174 unmodified lines