No way to detect root and document-relative urls
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Thanks for great library!
let uri = new URI("/example/");
uri.is("relative");
tells whether uri is relative or not. However, there is no way to distinguish those two urls:
let rootRelative = new URI("/example/");
let documentRelative = new URI("example/");
Both will be relative, while sometimes it is neccessary to determinate exactly which type of relative urls it is: root-relative or document-relative.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the URI.is("relative") entry point shown in the issue and inspect how it classifies paths beginning with "/" versus those without it. Define completion as exposing a way to distinguish root-relative "/example/" from document-relative "example/", while preserving the existing relative classification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100