Skip to content
Myr

ocd

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

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 579a1be · Browse files · 1 file+1 added−2 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+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:lib/utils.js+1 added-2 removed
231 unmodified lines
232 */233234exports.pathRegexp = function(path, keys, sensitive, strict) {235 if (path instanceof RegExp) return path;236 if (path instanceof Array) 237 path = '(' + path.join('|') + ')';236 if (Array.isArray(path)) path = '(' + path.join('|') + ')';237 path = path238 .concat(strict ? '' : '/?')239 .replace(/\/\(/g, '(?:/')240 .replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g, function(_, slash, format, key, capture, optional){
13 unmodified lines