Skip to content
Myr

Removed escapeRegexp() util

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

authored by visionmedia · committed by visionmedia · parent 247e6ad · Browse files · 2 files+1 added−19 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+1 added−19 removed

  • other:+1 added−19 removed

2 files+1 added−19 removed

modified:lib/express/core.js+1 added-1 removed
68 unmodified lines
69 normalize: function(path) {70 var self = this71 this.params = []72 if (path instanceof RegExp) return path73 return new RegExp('^' + utils.escapeRegexp(normalizePath(path), '.')73 return new RegExp('^' + RegExp.escape(normalizePath(path), '.')74 .replace(/\*/g, '(.+)')75 .replace(/(\/|\\\.):(\w+)\?/g, function(_, c, key){76 self.params.push(key)77 return '(?:' + c + '([^\/]+))?'
258 unmodified lines
modified:lib/express/utils.js-18 removed