Skip to content
Myr

Added splat support [#78]

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

authored by visionmedia · committed by visionmedia · parent 11a96ff · Browse files · 2 files+7 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

2 files+7 added−4 removed

  • tests:+3 added−3 removed
  • other:+4 added−1 removed

2 files+7 added−4 removed

modified:lib/express/core.js+4 added-1 removed
74 unmodified lines
75 normalize: function(path) {76 var self = this77 this.keys = []78 if (path instanceof RegExp) return path79 return new RegExp('^' + normalizePath(path)79 return new RegExp('^' + escapeRegexp(normalizePath(path), '.')80 .replace(/[*]/g, function(){81 return '(.+)'82 })83 .replace(/\/:(\w+)\?/g, function(_, key){84 self.keys.push(key)85 return '(?:\/([^\/]+))?'86 })
177 unmodified lines
modified:spec/spec.request.js+3 added-3 removed