Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support +s #26

Closed
jonathanong opened this issue May 28, 2014 · 6 comments
Closed

support +s #26

jonathanong opened this issue May 28, 2014 · 6 comments

Comments

@jonathanong
Copy link
Member

not sure if it's supported right now

expressjs/express#2134

@blakeembrey
Copy link
Member

@jonathanong From what he wants, it isn't currently possible since the param needs to equal an array of the parts. Perhaps we can come up with a key syntax for supporting this or add a key utility as part of the module instead of just giving back regexps?

@blakeembrey
Copy link
Member

Otherwise we can just return the thing itself repeated and the user can split on the slashes?

@jonathanong
Copy link
Member Author

gah i'm not sure what's the best option. maybe change the entire project to be path.parse('some string route') and var params = path.exec('/some/path'). then we aren't limited to regexps.

@jonathanong
Copy link
Member Author

errr actually var path = parse('/somet/route/string') then var params = path.exec('/some/route').

@jonathanong
Copy link
Member Author

since this would require a completely different name, maybe just use a different library. maybe https://github.com/expressjs/path-match since that's the API i was looking for.

@blakeembrey
Copy link
Member

This could be possible with a small refactor. If this repo provides the type instead of just whether it's optional, path-match can then just split on /'s. Thoughts?

blakeembrey referenced this issue in blakeembrey/path-match Jun 11, 2014
* The tail property looks kind of flimsy and its unnecessary with the latest `path-to-regexp`
* Splits repeat parameter names by their delimiter
* Closes component/path-to-regexp#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants