We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
De-duplicate/collapse forward slashes when multiple pieces are provided,
Using [email protected]:
[email protected]
urlJoin('/', '/')
'/'
urlJoin('/', '/sub', '/something')
'/sub/something'
urlJoin('/', '/sub/', '/something')
urlJoin('//', '/something')
'/something'
urlJoin('/', '/', '/something')
'//something'
urlJoin('/', '//', '/something')
Is this behavior expected?
Related issues,
This issue was spawned from https://gitlab.com/gitlab-org/gitlab-selenium-server/merge_requests/10
The text was updated successfully, but these errors were encountered:
pathPrefix
For this case, urlJoin('//', '/something') -> '/something, I think it should return '//something' for matching the rule of protocol-relative URL.
urlJoin('//', '/something') -> '/something
Sorry, something went wrong.
+1 same issues.
const prefix = '/a'; await import('url-join').then(join => join.default('http://localhost', prefix, '/swagger')) // out: 'http://localhost//swagger'
const prefix = '/doc'; await import('url-join').then(join => join.default('http://localhost', prefix, '/swagger')) // out: 'http://localhost/doc/swagger'
No branches or pull requests
De-duplicate/collapse forward slashes when multiple pieces are provided,
Using
[email protected]
:urlJoin('/', '/')
->'/'
✔️urlJoin('/', '/sub', '/something')
->'/sub/something'
✔️urlJoin('/', '/sub/', '/something')
->'/sub/something'
✔️urlJoin('//', '/something')
->'/something'
✔️urlJoin('/', '/', '/something')
->'//something'
: ❌ expected'/something'
urlJoin('/', '//', '/something')
->'//something'
: ❌ this isn't my exact use case but I guess this should also be'/something'
Is this behavior expected?
Related issues,
This issue was spawned from https://gitlab.com/gitlab-org/gitlab-selenium-server/merge_requests/10
The text was updated successfully, but these errors were encountered: