Socket
Socket
Sign inDemoInstall

path-parser

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-parser - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

dist/test/main.test.d.ts

13

CHANGELOG.md

@@ -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 @@

3

dist/path-parser.cjs.development.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc