url-pattern
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -116,3 +116,6 @@ // Generated by CoffeeScript 1.9.1 | ||
}; | ||
UrlPattern.newPattern = function() { | ||
throw Error('`urlPattern.newPattern` is no longer supported. Use `new Pattern` instead.'); | ||
}; | ||
return UrlPattern; | ||
}); |
{ | ||
"name": "url-pattern", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "url-pattern is easy pattern matching and segment extraction for urls, domains, filepaths and any string composed of segments joined by a separator character", | ||
@@ -12,10 +12,17 @@ "keywords": ["url", "pattern", "matching", "routing", "route", "regex", "match", "segment", "path", "domain", "separator"], | ||
}, | ||
"contributors": [{ | ||
"name": "Andrey Popp", | ||
"email": "8mayday@gmail.com", | ||
"url": "https://github.com/andreypopp" | ||
}, { | ||
"name": "Samuel Reed", | ||
"url": "https://github.com/STRML" | ||
}], | ||
"contributors": [ | ||
{ | ||
"name": "Andrey Popp", | ||
"email": "8mayday@gmail.com", | ||
"url": "https://github.com/andreypopp" | ||
}, | ||
{ | ||
"name": "Samuel Reed", | ||
"url": "https://github.com/STRML" | ||
}, | ||
{ | ||
"name": "Michael Trotter", | ||
"url": "https://github.com/spicydonuts" | ||
} | ||
], | ||
"bugs": { | ||
@@ -22,0 +29,0 @@ "url": "http://github.com/snd/url-pattern/issues", |
@@ -106,3 +106,3 @@ # url-pattern | ||
the default separator is `/`. you can pass a custom separator | ||
as the second argument to `newPattern`. | ||
as the second argument to `Pattern`. | ||
@@ -121,3 +121,3 @@ ##### match pattern against domain | ||
```javascript | ||
var regexPattern = urlPattern.newPattern(/example\.(.*)/); | ||
var regexPattern = new Pattern(/example\.(.*)/); | ||
``` | ||
@@ -166,3 +166,32 @@ | ||
``` | ||
### contribution | ||
**TLDR: bugfixes, issues and discussion are always welcome. | ||
ask me before implementing new features.** | ||
i will happily merge pull requests that fix bugs with reasonable code. | ||
i will only merge pull requests that modify/add functionality | ||
if the changes align with my goals for this package | ||
and only if the changes are well written, documented and tested. | ||
**communicate:** write an issue to start a discussion | ||
before writing code that may or may not get merged. | ||
### todo | ||
- https://github.com/snd/url-pattern/issues/6 | ||
- parse string into array of objects describing structure | ||
- constant | ||
- binding | ||
- wildcard | ||
- optional | ||
- multiple occurences of the same name are collected into an array | ||
- this elegantly normalizes * and : | ||
- binding parsing is flexible and has a start and end regex | ||
- default: `:` and `[^a-zA-Z0-9] | ||
- custom: `#{` and `}` | ||
- test that empty names are not allowed | ||
- browser tests | ||
## [license: MIT](LICENSE) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
24174
119
195
0