route-node
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -0,1 +1,7 @@ | ||
<a name="1.3.4"></a> | ||
## [1.3.4](https://github.com/troch/route-node/compare/v1.3.3...v1.3.4) (2016-02-18) | ||
<a name="1.3.3"></a> | ||
@@ -2,0 +8,0 @@ ## [1.3.3](https://github.com/troch/route-node/compare/v1.3.2...v1.3.3) (2016-02-17) |
@@ -389,13 +389,20 @@ define('RouteNode', function () { 'use strict'; | ||
var splitParam = p.split('='); | ||
var hasBrackets = bracketTest.test(splitParam[0]); | ||
var key = splitParam[0]; | ||
var hasBrackets = bracketTest.test(key); | ||
var val = decodeURIComponent(splitParam[1]); | ||
val = hasBrackets ? [val] : val; | ||
if (params.indexOf(withoutBrackets(key)) === -1) obj[key] = val || ''; | ||
if (params.indexOf(withoutBrackets(key)) === -1) { | ||
if (obj[key] === undefined) obj[key] = val || '';else obj[key] = [].concat(obj[key], val); | ||
} | ||
return obj; | ||
}, {}); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).map(function (p) { | ||
return [p].concat(isSerialisable(remainingSearchParams[p]) ? encodeURIComponent(remainingSearchParams[p]) : []); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).reduce(function (acc, param) { | ||
return acc.concat([].concat(remainingSearchParams[param]).map(function (p) { | ||
return { key: param, val: p }; | ||
})); | ||
}, []).map(function (p) { | ||
return [p.key].concat(isSerialisable(p.val) ? encodeURIComponent(p.val) : []); | ||
}).map(function (p) { | ||
@@ -402,0 +409,0 @@ return p.join('='); |
@@ -39,13 +39,20 @@ 'use strict'; | ||
var splitParam = p.split('='); | ||
var hasBrackets = bracketTest.test(splitParam[0]); | ||
var key = splitParam[0]; | ||
var hasBrackets = bracketTest.test(key); | ||
var val = decodeURIComponent(splitParam[1]); | ||
val = hasBrackets ? [val] : val; | ||
if (params.indexOf(withoutBrackets(key)) === -1) obj[key] = val || ''; | ||
if (params.indexOf(withoutBrackets(key)) === -1) { | ||
if (obj[key] === undefined) obj[key] = val || '';else obj[key] = [].concat(obj[key], val); | ||
} | ||
return obj; | ||
}, {}); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).map(function (p) { | ||
return [p].concat(isSerialisable(remainingSearchParams[p]) ? encodeURIComponent(remainingSearchParams[p]) : []); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).reduce(function (acc, param) { | ||
return acc.concat([].concat(remainingSearchParams[param]).map(function (p) { | ||
return { key: param, val: p }; | ||
})); | ||
}, []).map(function (p) { | ||
return [p.key].concat(isSerialisable(p.val) ? encodeURIComponent(p.val) : []); | ||
}).map(function (p) { | ||
@@ -52,0 +59,0 @@ return p.join('='); |
@@ -393,13 +393,20 @@ (function (global, factory) { | ||
var splitParam = p.split('='); | ||
var hasBrackets = bracketTest.test(splitParam[0]); | ||
var key = splitParam[0]; | ||
var hasBrackets = bracketTest.test(key); | ||
var val = decodeURIComponent(splitParam[1]); | ||
val = hasBrackets ? [val] : val; | ||
if (params.indexOf(withoutBrackets(key)) === -1) obj[key] = val || ''; | ||
if (params.indexOf(withoutBrackets(key)) === -1) { | ||
if (obj[key] === undefined) obj[key] = val || '';else obj[key] = [].concat(obj[key], val); | ||
} | ||
return obj; | ||
}, {}); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).map(function (p) { | ||
return [p].concat(isSerialisable(remainingSearchParams[p]) ? encodeURIComponent(remainingSearchParams[p]) : []); | ||
var remainingSearchPart = Object.keys(remainingSearchParams).reduce(function (acc, param) { | ||
return acc.concat([].concat(remainingSearchParams[param]).map(function (p) { | ||
return { key: param, val: p }; | ||
})); | ||
}, []).map(function (p) { | ||
return [p.key].concat(isSerialisable(p.val) ? encodeURIComponent(p.val) : []); | ||
}).map(function (p) { | ||
@@ -406,0 +413,0 @@ return p.join('='); |
{ | ||
"name": "route-node", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "A package to create a tree of named routes", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/route-node.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
214340
2267