path-parser
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -0,1 +1,14 @@ | ||
# [5.1.0](https://github.com/troch/path-parser/compare/v5.0.1...v5.1.0) (2019-12-30) | ||
### Features | ||
* add generic type to `Path` ([#45](https://github.com/troch/path-parser/issues/45)) ([33eaed2](https://github.com/troch/path-parser/commit/33eaed2857fb4bd5b28dd504231af23f0b9ba547)) | ||
* Update `search-params` to latest version | ||
### Bug Fixes | ||
* Fix missing dependency `tslib` | ||
## [5.0.1](https://github.com/troch/path-parser/compare/v5.0.0...v5.0.1) (2019-12-29) | ||
@@ -2,0 +15,0 @@ |
@@ -212,3 +212,4 @@ 'use strict'; | ||
// Extend url match | ||
Object.keys(queryParams).forEach(function (p) { | ||
Object.keys(queryParams).forEach( // @ts-ignore | ||
function (p) { | ||
return match[p] = queryParams[p]; | ||
@@ -215,0 +216,0 @@ }); |
@@ -208,3 +208,4 @@ import { __assign } from 'tslib'; | ||
// Extend url match | ||
Object.keys(queryParams).forEach(function (p) { | ||
Object.keys(queryParams).forEach( // @ts-ignore | ||
function (p) { | ||
return match[p] = queryParams[p]; | ||
@@ -211,0 +212,0 @@ }); |
@@ -18,5 +18,5 @@ import { IOptions } from 'search-params'; | ||
} | ||
export declare type TestMatch = Record<string, any> | null; | ||
export declare class Path { | ||
static createPath(path: string): Path; | ||
export declare type TestMatch<T extends Record<string, any> = Record<string, any>> = T | null; | ||
export declare class Path<T extends Record<string, any> = Record<string, any>> { | ||
static createPath<T extends Record<string, any> = Record<string, any>>(path: string): Path<T>; | ||
path: string; | ||
@@ -36,4 +36,4 @@ tokens: IToken[]; | ||
isSpatParam(name: string): boolean; | ||
test(path: string, opts?: ITestOptions): TestMatch; | ||
partialTest(path: string, opts?: IPartialTestOptions): TestMatch; | ||
test(path: string, opts?: ITestOptions): TestMatch<T>; | ||
partialTest(path: string, opts?: IPartialTestOptions): TestMatch<T>; | ||
build(params?: Record<string, any>, opts?: IBuildOptions): string; | ||
@@ -40,0 +40,0 @@ private getParams; |
{ | ||
"name": "path-parser", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "A small utility to parse, match and generate paths", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"test": "tsdx test", | ||
"lint": "tsdx lint", | ||
"lint": "tsdx lint src test", | ||
"prepare": "tsdx build", | ||
@@ -25,3 +25,3 @@ "clog": "conventional-changelog -p angular -i CHANGELOG.md -s" | ||
"hooks": { | ||
"pre-commit": "tsdx lint" | ||
"pre-commit": "tsdx lint src test" | ||
} | ||
@@ -39,3 +39,4 @@ }, | ||
"dependencies": { | ||
"search-params": "2.1.3" | ||
"search-params": "3.0.0", | ||
"tslib": "^1.10.0" | ||
}, | ||
@@ -47,5 +48,4 @@ "devDependencies": { | ||
"tsdx": "^0.12.1", | ||
"tslib": "^1.10.0", | ||
"typescript": "^3.7.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
106674
5
16
677
2
+ Addedtslib@^1.10.0
+ Addedsearch-params@3.0.0(transitive)
+ Addedtslib@1.14.1(transitive)
- Removedsearch-params@2.1.3(transitive)
Updatedsearch-params@3.0.0