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

isUrl('https://www') returns true (as does any https://xyz) #14

Closed
AleksandrHovhannisyan opened this issue Sep 27, 2023 · 2 comments
Closed

Comments

@AleksandrHovhannisyan
Copy link

AleksandrHovhannisyan commented Sep 27, 2023

Same for the http variant. Technically, this isn't an issue with your package since for some reason the URL constructor allows you to create URLs like https://xyz even though they're missing the TLD.

Is this working as expected? If not, where would I file an issue for something like this that's built into JS?

@sindresorhus
Copy link
Owner

Those are valid URLs. A TLD is only required for public URLs.

TLD-less URLs (Top-Level Domain-less URLs) are URLs that don't have a top-level domain like .com, .org, etc. They're often used in local network environments. For example, http://webserver/ could resolve to a local web server within a corporate network.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@AleksandrHovhannisyan
Copy link
Author

Oh I see, thanks for clarifying

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

2 participants