path-to-regexp
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -34,2 +34,3 @@ /** | ||
var flags = options.sensitive ? '' : 'i'; | ||
var lookahead = options.lookahead !== false; | ||
var extraOffset = 0; | ||
@@ -127,5 +128,9 @@ var keysOffset = keys.length; | ||
// If the path is non-ending, match until the end or a slash. | ||
path += (end ? '$' : (path[path.length - 1] === '/' ? '' : '(?=\\/|$)')); | ||
if (end) { | ||
path += '$'; | ||
} else if (path[path.length - 1] !== '/') { | ||
path += lookahead ? '(?=\\/|$)' : '(?:\/|$)'; | ||
} | ||
return new RegExp(path, flags); | ||
}; |
{ | ||
"name": "path-to-regexp", | ||
"description": "Express style path to RegExp utility", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"files": [ | ||
@@ -6,0 +6,0 @@ "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6210
112