New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

path-to-regex

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-to-regex - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

4

index.js

@@ -99,6 +99,6 @@ module.exports = Regex;

const isMultiple = (quant === "*" || quant === "+") ? true : false;
// if (pat && /^(\[[^\[\]]+\]|\([^\(\)]+\)|\.|\\.)[\+\*]$/) isMultiple = true;
// if (pat && /^(\[[^\[\]]+\]|\([^\(\)]+\)|\.|\\.)[\+\*]$/.test(pat) ) isMultiple = true;
let isRequired = (quant !== "*" && quant !== "?") ? true : false;
if (!quant && pat && /^(\[[^\[\]]+\]|\([^\(\)]+\)|\.|\\.)[\*\?]?$/) isRequired = false;
if (!quant && pat && /^(\[[^\[\]]+\]|\([^\(\)]+\)|\.|\\.)[\*\?]?$/.test(pat)) isRequired = false;

@@ -105,0 +105,0 @@ const quantifier = quant ? quant : "";

{
"name": "path-to-regex",
"version": "1.3.5",
"version": "1.3.6",
"description": "Turn a path string such as /user/:id or /user/:id(\\d+) into a regular expression",

@@ -5,0 +5,0 @@ "main": "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