{"id":15297280,"url":"https://github.com/mattiadevivo/build-url","last_synced_at":"2025-07-12T16:06:41.606Z","repository":{"id":62997079,"uuid":"564202270","full_name":"mattiadevivo/build-url","owner":"mattiadevivo","description":"A super simple url builder","archived":false,"fork":false,"pushed_at":"2022-12-15T15:48:08.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T18:52:31.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattiadevivo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-10T08:01:12.000Z","updated_at":"2022-11-10T12:14:05.000Z","dependencies_parsed_at":"2023-01-29T03:31:11.056Z","dependency_job_id":null,"html_url":"https://github.com/mattiadevivo/build-url","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattiadevivo/build-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fbuild-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fbuild-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fbuild-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fbuild-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattiadevivo","download_url":"https://codeload.github.com/mattiadevivo/build-url/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattiadevivo%2Fbuild-url/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265017096,"owners_count":23698425,"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-09-30T19:16:18.954Z","updated_at":"2025-07-12T16:06:41.586Z","avatar_url":"https://github.com/mattiadevivo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @mattiadevivo/build-url\n\n[![Publish to npmjs](https://github.com/mattiadevivo/build-url/actions/workflows/npm-publish.yml/badge.svg?branch=master)](https://github.com/mattiadevivo/build-url/actions/workflows/npm-publish.yml)\n\nA super simple and zero-dependency url builder.\n\nYou're coming from `build-url` package but it's been deprecated and lacks support for **ESM** and **TS**?\nThis new build-url comes with the intention of substituting it with **zero dependencies**, let's help me to make it a better version (see [CONTRIBUTING.md](./CONTRIBUTING.md))!\n\n## Installation\n\nInstall it with npm:\n```bash\nnpm install @mattiadevivo/build-url --save\n```\n\nNo need of `@types` package since it has built-in support for TypeScript. \n\n## Usage\n\n- No need to manage ending *basePath* ending with `/` or *path* starting with `/`, the function will manage it.\n\n- No need to worry about double `/`, *build-url* function will remove them (except for the ones after the protocol i.e. `https://`).\n\nUsage in TypeScript/ES6:\n```ts\nimport {buildUrl} from \"@mattiadevivo/build-url\";\n\nconst result = buildUrl(\"http://localhost:8080\", {\n  path: \"api/hello/\",\n  queryParams: {\n    a: 1,\n    b: 2,\n  },\n});\n// This will produce http://localhost:8080/api/hello/?a=1\u0026b=2\n```\n\n\nThere is no support for commonjs modules right now, but it will be introduced later!\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md)\n\n## Want to contribute?\n\nThis project is under a MIT license.\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiadevivo%2Fbuild-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattiadevivo%2Fbuild-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattiadevivo%2Fbuild-url/lists"}