{"id":21806688,"url":"https://github.com/hungtcs/url-component-join","last_synced_at":"2025-03-21T08:12:47.175Z","repository":{"id":59862699,"uuid":"538774722","full_name":"hungtcs/url-component-join","owner":"hungtcs","description":"normalize and join url components","archived":false,"fork":false,"pushed_at":"2022-11-17T09:11:09.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T04:41:47.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hungtcs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-20T02:16:40.000Z","updated_at":"2022-09-20T03:26:45.000Z","dependencies_parsed_at":"2023-01-22T14:30:57.746Z","dependency_job_id":null,"html_url":"https://github.com/hungtcs/url-component-join","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungtcs%2Furl-component-join","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungtcs%2Furl-component-join/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungtcs%2Furl-component-join/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungtcs%2Furl-component-join/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hungtcs","download_url":"https://codeload.github.com/hungtcs/url-component-join/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759962,"owners_count":20505716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T12:29:17.958Z","updated_at":"2025-03-21T08:12:47.155Z","avatar_url":"https://github.com/hungtcs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Component Join\n\nnormalize and join url components\n\n## Installation\n\n```shell\nnpm install --save url-component-join\n```\n\n## Functions\n\n### `normalize(path: string): string`\n\nNormalizes the given path, remove redundant `/` and resolving `..` and `.` segments.\n\n```ts\nimport { normalize } from 'url-component-join';\n\nnormalize('//a/a/..//b.c');\n// /a/b.c\n```\n\n### `join(...paths: Array\u003cstring\u003e): string`\n\nNormalize and join several segments into one path\n\n```ts\nimport { join } from 'url-component-join';\n\njoin('//a/a/', '..', '//b.c');\n// /a/b.c\n\njoin('http://127.0.0.1:8080/a//b', '//c///d')\n// http://127.0.0.1:8080/a/b/c/d\n\njoin('http://127.0.0.1:8080/a//b', 'http://127.0.0.1:8080//c///d')\n// http://127.0.0.1:8080/a/b/c/d\n```\n\n### `basename(path: string): string`\n\n### `dirname(path: string): string`\n\n### `relative(from: string, to: string): string`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungtcs%2Furl-component-join","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhungtcs%2Furl-component-join","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungtcs%2Furl-component-join/lists"}