path-parser
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,11 @@ | ||
<a name="1.0.2"></a> | ||
## [1.0.2](https://github.com/troch/path-parser/compare/v1.0.1...v1.0.2) (2016-01-06) | ||
### Bug Fixes | ||
* improve full path matching of a path with query params ([ada3897](https://github.com/troch/path-parser/commit/ada3897)) | ||
<a name="1.0.1"></a> | ||
@@ -2,0 +12,0 @@ ## [1.0.1](https://github.com/troch/path-parser/compare/v1.0.0...v1.0.1) (2016-01-05) |
@@ -257,4 +257,3 @@ define('Path', function () { 'use strict'; | ||
// Check if exact match | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$'))); | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '(\\?.*$|$)' : '$'))); | ||
// If no match, or no query params, no need to go further | ||
@@ -261,0 +260,0 @@ if (!matched || !this.hasQueryParams) return matched; |
@@ -239,4 +239,3 @@ 'use strict'; | ||
// Check if exact match | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$'))); | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '(\\?.*$|$)' : '$'))); | ||
// If no match, or no query params, no need to go further | ||
@@ -243,0 +242,0 @@ if (!matched || !this.hasQueryParams) return matched; |
@@ -261,4 +261,3 @@ (function (global, factory) { | ||
// Check if exact match | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$'))); | ||
var matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '(\\?.*$|$)' : '$'))); | ||
// If no match, or no query params, no need to go further | ||
@@ -265,0 +264,0 @@ if (!matched || !this.hasQueryParams) return matched; |
@@ -178,4 +178,3 @@ const defaultOrConstrained = (match) => | ||
// Check if exact match | ||
const matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '\\?.*$' : '$'))); | ||
const matched = this._urlMatch(path, new RegExp('^' + source + (this.hasQueryParams ? '(\\?.*$|$)' : '$'))); | ||
// If no match, or no query params, no need to go further | ||
@@ -182,0 +181,0 @@ if (!matched || !this.hasQueryParams) return matched; |
{ | ||
"name": "path-parser", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A small utility to parse, match and generate paths", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/path-parser.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
70647