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

pathname === '' ? #96

Closed
mantou132 opened this issue Jan 23, 2018 · 3 comments
Closed

pathname === '' ? #96

mantou132 opened this issue Jan 23, 2018 · 3 comments

Comments

@mantou132
Copy link

Hope to provide a parameter to be compatible Web URL https://developer.mozilla.org/en-US/docs/Web/API/URL

new URL('http://www.example.com').pathname === '/'
==> true

@lpinca
Copy link
Member

lpinca commented Jan 23, 2018

Yes, this is a deviation from the Node.js and browser URL behavior. Changing this would be a breaking change and I'm not sure if it's worth the effort.

@nigelellis
Copy link

nigelellis commented Aug 12, 2021

FWIW, this behavior was changed in #197 and has broken a bunch of our code assumptions.

@lpinca
Copy link
Member

lpinca commented Aug 13, 2021

I'm closing this as behavior is now consistent with the browser and Node.js WHATWG URL parser.

@lpinca lpinca closed this as completed Aug 13, 2021
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

3 participants