Closed familyboat closed 3 days ago
This issue is prevalent in the URL module, yet there is no mention of it in the documentation. Perhaps we could improve the documentation, or we might consider narrowing the range of acceptable input parameters.
The @std/url
package handles URLs, not paths. This is expected behavior. I think you're looking for basename()
from @std/path
.
I'll close this issue. Please feel free to re-open if you feel there's a need.
I agree with the point you mentioned; users also have the responsibility to ensure they are using the corresponding features as required. I am just a bit excited and looking forward to the upcoming stable version, and I have done some checks to the best of my ability. Your work is highly valuable.
Code snippet:
When you run above code, error throwed. You can get more information in https://developer.mozilla.org/en-US/docs/Web/API/URL/URL