{"id":23896513,"url":"https://github.com/brecert/mouri","last_synced_at":"2025-04-10T16:34:01.932Z","repository":{"id":57303163,"uuid":"298667375","full_name":"brecert/mouri","owner":"brecert","description":"A simple, easy to use, and relatively performant way to create and join uri parts together.","archived":false,"fork":false,"pushed_at":"2022-01-23T22:10:50.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T14:21:20.375Z","etag":null,"topics":["deno","join-uri-parts","typescript","uri"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brecert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-25T19:55:21.000Z","updated_at":"2023-07-18T15:03:45.000Z","dependencies_parsed_at":"2022-09-02T06:35:52.635Z","dependency_job_id":null,"html_url":"https://github.com/brecert/mouri","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fmouri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fmouri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fmouri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brecert%2Fmouri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brecert","download_url":"https://codeload.github.com/brecert/mouri/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252721,"owners_count":21072701,"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":["deno","join-uri-parts","typescript","uri"],"created_at":"2025-01-04T16:53:00.426Z","updated_at":"2025-04-10T16:34:01.906Z","avatar_url":"https://github.com/brecert.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mouri (もURI)\n\nA simple, easy to use, and relatively performant (see [benchmarks](#benchmarks))\nway to create and join uri parts together.\n\nPlease note that this is not meant to handle many edge cases, and is meant and\nmade for simple use cases.\n\n# Usage\n- [**Documentation**](https://doc.deno.land/https/deno.land/x/mouri/uri.ts)\n- [**Examples**](./examples/README.md)\n\n## Deno\n```ts\nimport { assertEquals } from \"https://deno.land/std@0.122.0/testing/asserts.ts\";\nimport uri from \"https://deno.land/x/mouri/mod.ts\";\n\nconst API_URL = \"https://api.example.com/\";\n\nconst userPostsUrl = (id: string, limit: number, offset: number) =\u003e {\n  return uri`${API_URL}/users/${id}/posts?${{ limit, offset }}`;\n};\n\nassertEquals(\n  userPostsUrl(\"112233445566778899\", 10, 5),\n  \"https://api.example.com/users/112233445566778899/posts?limit=10\u0026offset=5\",\n);\n```\n\n## Node\n\n`\u003e npm i mouri`\n\n```js\nimport { strict as assert } from 'assert';\nimport uri from 'mouri';\n\nconst API_URL = \"https://api.example.com/\";\n\nconst userPostsUrl = (id, limit, offset) =\u003e {\n  return uri`${API_URL}/users/${id}/posts?${{ limit, offset }}`;\n};\n\nassert.strictEqual(\n  userPostsUrl(\"112233445566778899\", 10, 5),\n  \"https://api.example.com/users/112233445566778899/posts?limit=10\u0026offset=5\"\n);\n```\n\n# Benchmarks\n\nTo run: `deno run .\\bench.ts`\n\n\u003c!-- BENCHMARKS START --\u003e\n## Simple URL joining\n\n\npattern:\n\u003e `{API_URL}/users/{id}/posts/limit={limit}\u0026offset={offset}`\n\nexpected result:\n\u003e `https://api.example.com/users/112233445566778899/posts/limit=10\u0026offset=5`\n            \n|Name|Runs|Total (ms)|Average (ms)|\n|:--|--:|--:|--:|\n|mouri|2000|12.058|0.006|\n|urlcat|2000|37.778|0.019|\n|handwritten|2000|46.136|0.023|\n\u003c!-- BENCHMARKS END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrecert%2Fmouri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrecert%2Fmouri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrecert%2Fmouri/lists"}