Socket
Socket
Sign inDemoInstall

path-parser

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-parser - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

dist/amd/path-parser.js

@@ -88,3 +88,3 @@ define(['exports', 'module'], function (exports, module) {

if (!trailingSlash || source === '/') return source;
return source.replace(/\/$/, '') + '(?:/)?';
return source.replace(/\/$/, '') + '(?:\\/)?';
};

@@ -165,3 +165,3 @@

// Check if exact match
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '?.*$' : '$')));
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$')));
// If no match, or no query params, no need to go further

@@ -168,0 +168,0 @@ if (!match || !this.hasQueryParams) return match;

@@ -91,3 +91,3 @@ 'use strict';

if (!trailingSlash || source === '/') return source;
return source.replace(/\/$/, '') + '(?:/)?';
return source.replace(/\/$/, '') + '(?:\\/)?';
};

@@ -168,3 +168,3 @@

// Check if exact match
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '?.*$' : '$')));
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$')));
// If no match, or no query params, no need to go further

@@ -171,0 +171,0 @@ if (!match || !this.hasQueryParams) return match;

@@ -100,3 +100,3 @@ (function (global, factory) {

if (!trailingSlash || source === '/') return source;
return source.replace(/\/$/, '') + '(?:/)?';
return source.replace(/\/$/, '') + '(?:\\/)?';
};

@@ -177,3 +177,3 @@

// Check if exact match
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '?.*$' : '$')));
var match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$')));
// If no match, or no query params, no need to go further

@@ -180,0 +180,0 @@ if (!match || !this.hasQueryParams) return match;

@@ -79,3 +79,3 @@ let defaultOrConstrained = (match) => {

if (!trailingSlash || source === '/') return source
return source.replace(/\/$/, '') + '(?:\/)?'
return source.replace(/\/$/, '') + '(?:\\/)?'
}

@@ -130,3 +130,3 @@

// Check if exact match
let match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\?.*$' : '$')))
let match = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$')))
// If no match, or no query params, no need to go further

@@ -133,0 +133,0 @@ if (!match || !this.hasQueryParams) return match

{
"name": "path-parser",
"version": "0.2.1",
"version": "0.2.2",
"description": "A small utility to parse, match and generate paths",

@@ -5,0 +5,0 @@ "main": "dist/commonjs/path-parser.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