Socket
Socket
Sign inDemoInstall

url-pattern

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.0 to 0.7.1

3

lib/url-pattern.js

@@ -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;
});

25

package.json
{
"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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc