elliotttf / express-request-version

Express middleware for defining and validating a version.
1 stars 2 forks source link

Documentation Wrong #65

Closed jwkellyiii closed 7 years ago

jwkellyiii commented 7 years ago

The documentation for setByPath is wrong. It states you use setVersion('/base') but the RegExp used will not match it. The RegExp that is generated is ^\/base\/(v?\d+(\.\d+){0,2}[^\/]*) which will only match setVersion('/base/'). The end / is extremely important.

elliotttf commented 7 years ago

Whoops! Thank you, fix incoming 🍻