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

Support environments other than node.js that have a global URL class #148

Open
jesseditson opened this issue Oct 4, 2024 · 0 comments · May be fixed by #149
Open

Support environments other than node.js that have a global URL class #148

jesseditson opened this issue Oct 4, 2024 · 0 comments · May be fixed by #149

Comments

@jesseditson
Copy link

There are a few environments that have become popular in the last few years that provide a native URL class - this includes v8 Isolates (cloudflare workers), and most/all modern browsers.

This library fails in these environments due to require('url'), which is unnecessary in those environments.

It should be fairly straightforward to detect the native URL object and fall back to a require only if it is not present, which would easily add support to a few new platforms.

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

Successfully merging a pull request may close this issue.

1 participant