You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

path-to-regexp

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-to-regexp - npm Package Compare versions

Comparing version

to
0.1.9

7

index.js

@@ -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);
};

2

package.json
{
"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",