route-node
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -0,1 +1,11 @@ | ||
<a name="3.1.1"></a> | ||
## [3.1.1](https://github.com/troch/route-node/compare/v3.1.0...v3.1.1) (2018-05-01) | ||
### Bug Fixes | ||
* pass query params options to parse and build functions ([fea47d7](https://github.com/troch/route-node/commit/fea47d7)) | ||
<a name="3.1.0"></a> | ||
@@ -2,0 +12,0 @@ # [3.1.0](https://github.com/troch/route-node/compare/v3.0.3...v3.1.0) (2018-04-19) |
@@ -93,3 +93,3 @@ 'use strict'; | ||
}, {}); | ||
var searchPart = searchParams.build(searchParamsObject); | ||
var searchPart = searchParams.build(searchParamsObject, options.queryParams); | ||
var path = segments | ||
@@ -136,3 +136,4 @@ .reduce(function (path, segment) { | ||
caseSensitive: caseSensitive, | ||
strictTrailingSlash: strictTrailingSlash | ||
strictTrailingSlash: strictTrailingSlash, | ||
queryParams: options.queryParams | ||
}); | ||
@@ -158,3 +159,3 @@ } | ||
} | ||
var querystring = searchParams.omit(getSearch(segment.replace(consumedPath, '')), child.parser.queryParams).querystring; | ||
var querystring = searchParams.omit(getSearch(segment.replace(consumedPath, '')), child.parser.queryParams, options.queryParams).querystring; | ||
remainingPath = | ||
@@ -177,3 +178,3 @@ getPath(remainingPath) + (querystring ? "?" + querystring : ''); | ||
// unmatched queryParams in non strict mode | ||
var remainingQueryParams_1 = searchParams.parse(remainingPath.slice(1)); | ||
var remainingQueryParams_1 = searchParams.parse(remainingPath.slice(1), options.queryParams); | ||
Object.keys(remainingQueryParams_1).forEach(function (name) { | ||
@@ -180,0 +181,0 @@ return (currentMatch.params[name] = remainingQueryParams_1[name]); |
@@ -91,3 +91,3 @@ import { build, omit, parse } from 'search-params'; | ||
}, {}); | ||
var searchPart = build(searchParamsObject); | ||
var searchPart = build(searchParamsObject, options.queryParams); | ||
var path = segments | ||
@@ -134,3 +134,4 @@ .reduce(function (path, segment) { | ||
caseSensitive: caseSensitive, | ||
strictTrailingSlash: strictTrailingSlash | ||
strictTrailingSlash: strictTrailingSlash, | ||
queryParams: options.queryParams | ||
}); | ||
@@ -156,3 +157,3 @@ } | ||
} | ||
var querystring = omit(getSearch(segment.replace(consumedPath, '')), child.parser.queryParams).querystring; | ||
var querystring = omit(getSearch(segment.replace(consumedPath, '')), child.parser.queryParams, options.queryParams).querystring; | ||
remainingPath = | ||
@@ -175,3 +176,3 @@ getPath(remainingPath) + (querystring ? "?" + querystring : ''); | ||
// unmatched queryParams in non strict mode | ||
var remainingQueryParams_1 = parse(remainingPath.slice(1)); | ||
var remainingQueryParams_1 = parse(remainingPath.slice(1), options.queryParams); | ||
Object.keys(remainingQueryParams_1).forEach(function (name) { | ||
@@ -178,0 +179,0 @@ return (currentMatch.params[name] = remainingQueryParams_1[name]); |
@@ -551,3 +551,3 @@ (function (global, factory) { | ||
}, {}); | ||
var searchPart = build(searchParamsObject); | ||
var searchPart = build(searchParamsObject, options.queryParams); | ||
var path = segments | ||
@@ -594,3 +594,4 @@ .reduce(function (path, segment) { | ||
caseSensitive: caseSensitive, | ||
strictTrailingSlash: strictTrailingSlash | ||
strictTrailingSlash: strictTrailingSlash, | ||
queryParams: options.queryParams | ||
}); | ||
@@ -616,3 +617,3 @@ } | ||
} | ||
var querystring = omit(getSearch$1(segment.replace(consumedPath, '')), child.parser.queryParams).querystring; | ||
var querystring = omit(getSearch$1(segment.replace(consumedPath, '')), child.parser.queryParams, options.queryParams).querystring; | ||
remainingPath = | ||
@@ -635,3 +636,3 @@ getPath(remainingPath) + (querystring ? "?" + querystring : ''); | ||
// unmatched queryParams in non strict mode | ||
var remainingQueryParams_1 = parse(remainingPath.slice(1)); | ||
var remainingQueryParams_1 = parse(remainingPath.slice(1), options.queryParams); | ||
Object.keys(remainingQueryParams_1).forEach(function (name) { | ||
@@ -638,0 +639,0 @@ return (currentMatch.params[name] = remainingQueryParams_1[name]); |
@@ -94,3 +94,3 @@ import { build } from 'search-params' | ||
const searchPart = build(searchParamsObject) | ||
const searchPart = build(searchParamsObject, options.queryParams) | ||
@@ -97,0 +97,0 @@ const path = segments |
@@ -38,3 +38,4 @@ import { omit, parse } from 'search-params' | ||
caseSensitive, | ||
strictTrailingSlash | ||
strictTrailingSlash, | ||
queryParams: options.queryParams | ||
}) | ||
@@ -71,3 +72,4 @@ } | ||
getSearch(segment.replace(consumedPath, '')), | ||
child.parser.queryParams | ||
child.parser.queryParams, | ||
options.queryParams | ||
) | ||
@@ -100,3 +102,6 @@ remainingPath = | ||
// unmatched queryParams in non strict mode | ||
const remainingQueryParams = parse(remainingPath.slice(1)) | ||
const remainingQueryParams = parse( | ||
remainingPath.slice(1), | ||
options.queryParams | ||
) | ||
@@ -103,0 +108,0 @@ Object.keys(remainingQueryParams).forEach( |
{ | ||
"name": "route-node", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "A package to create a tree of named routes", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/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
252803
2974