lukeed / regexparam

A tiny (394B) utility that converts route patterns into RegExp. Limited alternative to `path-to-regexp` 🙇‍♂️
MIT License
567 stars 23 forks source link

Regex Pattern Differs Between Versions #8

Closed travistrue2008 closed 5 years ago

travistrue2008 commented 5 years ago

It looks like the regex output changes between versions 1.2.1 and 1.3.0 when the loose property is set to true:

v.1.2.1: /^\/users(?:$|\/)/i v1.3.0: /^\/users(?=$|\/)/i

I get consistent output when it's not set though:

v1.2.1: /^\/users\/?$/i v.1.3.0: /^\/users\/?$/i

lukeed commented 5 years ago

Yes, that's intentional. It was actually a bug fix, see #5

Closing, but if you're seeing a specific issue that this caused please let me know and can reopen. Thanks!