path-parser
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,11 @@ | ||
<a name="1.0.3"></a> | ||
## [1.0.3](https://github.com/troch/path-parser/compare/v1.0.2...v1.0.3) (2016-06-29) | ||
### Bug Fixes | ||
* allow encoded URI components in URL parameters ([ae1ad85](https://github.com/troch/path-parser/commit/ae1ad85)), closes [router5/router5#63](https://github.com/router5/router5/issues/63) | ||
<a name="1.0.2"></a> | ||
@@ -2,0 +12,0 @@ ## [1.0.2](https://github.com/troch/path-parser/compare/v1.0.1...v1.0.2) (2016-01-06) |
@@ -30,3 +30,3 @@ define('Path', function () { 'use strict'; | ||
var defaultOrConstrained = function defaultOrConstrained(match) { | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~]+') + ')'; | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~%]+') + ')'; | ||
}; | ||
@@ -244,3 +244,3 @@ | ||
return match.slice(1, this.urlParams.length + 1).reduce(function (params, m, i) { | ||
params[_this.urlParams[i]] = m; | ||
params[_this.urlParams[i]] = decodeURIComponent(m); | ||
return params; | ||
@@ -247,0 +247,0 @@ }, {}); |
@@ -12,3 +12,3 @@ 'use strict'; | ||
var defaultOrConstrained = function defaultOrConstrained(match) { | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~]+') + ')'; | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~%]+') + ')'; | ||
}; | ||
@@ -226,3 +226,3 @@ | ||
return match.slice(1, this.urlParams.length + 1).reduce(function (params, m, i) { | ||
params[_this.urlParams[i]] = m; | ||
params[_this.urlParams[i]] = decodeURIComponent(m); | ||
return params; | ||
@@ -229,0 +229,0 @@ }, {}); |
@@ -34,3 +34,3 @@ (function (global, factory) { | ||
var defaultOrConstrained = function defaultOrConstrained(match) { | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~]+') + ')'; | ||
return '(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~%]+') + ')'; | ||
}; | ||
@@ -248,3 +248,3 @@ | ||
return match.slice(1, this.urlParams.length + 1).reduce(function (params, m, i) { | ||
params[_this.urlParams[i]] = m; | ||
params[_this.urlParams[i]] = decodeURIComponent(m); | ||
return params; | ||
@@ -251,0 +251,0 @@ }, {}); |
const defaultOrConstrained = (match) => | ||
'(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~]+') + ')'; | ||
'(' + (match ? match.replace(/(^<|>$)/g, '') : '[a-zA-Z0-9-_.~%]+') + ')'; | ||
@@ -169,3 +169,3 @@ const rules = [ | ||
.reduce((params, m, i) => { | ||
params[this.urlParams[i]] = m; | ||
params[this.urlParams[i]] = decodeURIComponent(m); | ||
return params; | ||
@@ -172,0 +172,0 @@ }, {}); |
{ | ||
"name": "path-parser", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A small utility to parse, match and generate paths", | ||
@@ -8,3 +8,3 @@ "main": "dist/commonjs/path-parser.js", | ||
"scripts": { | ||
"test": "_mocha", | ||
"test": "mocha --compilers js:babel-core/register", | ||
"test-cover": "istanbul cover _mocha", | ||
@@ -11,0 +11,0 @@ "lint": "eslint modules/*.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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
60760
8
1107