kenchris / urlpattern-polyfill

URLPattern polyfill
https://www.npmjs.com/package/urlpattern-polyfill
MIT License
267 stars 30 forks source link

Correctly parse constructor strings. #20

Closed wanderview closed 3 years ago

wanderview commented 3 years ago

Note, this change includes 2 changes to path-to-regexp. These have already been incorporated and pushed to the branches at:

https://github.com/wanderview/path-to-regexp/branches

wanderview commented 3 years ago

This PR is another step towards fixing #7.

wanderview commented 3 years ago

Thanks!

Looks fine. Was wondering whether the "END" has to be a string or not

The path-to-regexp type is not an enum, so I think it has to be a string. We could propose changing that upstream, but I chose not to here. I guess its a bit confusing since I made the state type an enum.