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

Always matches last slash #1

Closed
walling opened this issue Sep 19, 2013 · 2 comments
Closed

Always matches last slash #1

walling opened this issue Sep 19, 2013 · 2 comments

Comments

@walling
Copy link

walling commented Sep 19, 2013

Given the following example:

var murl = require('murl');
var program = murl('/program/{id}');
console.log(program('/program/1'));
console.log(program('/program/1/'));

The output is:

{ id: '1' }
{ id: '1' }

Can I somehow specify an option, so that the last pattern does not match (ending with a slash)?

@mafintosh
Copy link
Owner

Upgrade to 0.3 and pass {strict:true} to murl
Let me know if this fixes your problem.

@walling
Copy link
Author

walling commented Sep 19, 2013

Yes, it does. Thanks!

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