Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

path-to-regexp

Package Overview
Dependencies
Maintainers
5
Versions
67
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 0.1.8 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc