path-to-regex
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "path-to-regex", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Turn a path string such as /user/:id or /user/:id(\\d+) into a regular expression", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -130,37 +130,50 @@ # path-to-regex | ||
let result = parser.match('/user/123/bar/111qwertyfak/222foo/test/pictures-p01.png,p02.png,p03.png/333'); // result: { id: '123', | ||
key: [ '111', '222', '333' ], | ||
post: 'qwerty', | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } | ||
let result = parser.match('/user/123/bar/111qwertyfak/222foo/test/pictures-p01.png-p02.png-p03.png'); // result: { id: '123', | ||
key: [ '111', '222' ], | ||
post: 'qwerty', | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } | ||
let result = parser.match('/user/123/bar/111fak/222foo/test/pictures-p01.png,p02.png,p03.png'); // result: { id: '123', | ||
key: [ '111', '222' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png;p02.png;p03.png'); // result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png p02.png'); // result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png' ] } | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png'); // result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png' ] } | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-'); // result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [] } | ||
let result = parser.match('/user/123/bar/111qwertyfak/222foo/test/pictures-p01.png,p02.png,p03.png/333'); | ||
/* result: { id: '123', | ||
key: [ '111', '222', '333' ], | ||
post: 'qwerty', | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } */ | ||
let result = parser.match('/user/123/bar/111qwertyfak/222foo/test/pictures-p01.png-p02.png-p03.png'); | ||
/* result: { id: '123', | ||
key: [ '111', '222' ], | ||
post: 'qwerty', | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } */ | ||
let result = parser.match('/user/123/bar/111fak/222foo/test/pictures-p01.png,p02.png,p03.png'); | ||
/* result: { id: '123', | ||
key: [ '111', '222' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } */ | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png;p02.png;p03.png'); | ||
/* result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png', 'p03.png' ] } */ | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png p02.png'); | ||
/* result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png', 'p02.png' ] } */ | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-p01.png'); | ||
/* result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [ 'p01.png' ] } */ | ||
let result = parser.match('/user/123/bar/111fak/foo/test/pictures-'); | ||
/* result: { id: '123', | ||
key: [ '111' ], | ||
post: undefined, | ||
foo: [ 'foo' ], | ||
multi: [] } */ | ||
``` | ||
@@ -167,0 +180,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
202
0
61959