{"id":17963883,"url":"https://github.com/bramstein/url-template","last_synced_at":"2025-05-15T22:12:11.783Z","repository":{"id":5185324,"uuid":"6359971","full_name":"bramstein/url-template","owner":"bramstein","description":"A JavaScript URI template implementation (RFC 6570 compliant)","archived":false,"fork":false,"pushed_at":"2024-02-01T11:30:30.000Z","size":147,"stargazers_count":184,"open_issues_count":0,"forks_count":35,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-17T20:39:49.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"apigee-127/swagger-converter","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bramstein.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-23T21:05:13.000Z","updated_at":"2025-02-11T20:25:03.000Z","dependencies_parsed_at":"2022-08-30T20:01:00.243Z","dependency_job_id":"079435dc-3a91-4572-8a9d-9e8878214151","html_url":"https://github.com/bramstein/url-template","commit_stats":{"total_commits":90,"total_committers":12,"mean_commits":7.5,"dds":0.6555555555555556,"last_synced_commit":"a8e204a92de3168a56ef2e528ae4d841287636fd"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstein%2Furl-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstein%2Furl-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstein%2Furl-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstein%2Furl-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bramstein","download_url":"https://codeload.github.com/bramstein/url-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250440092,"owners_count":21430950,"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-10-29T11:45:46.381Z","updated_at":"2025-05-15T22:12:06.768Z","avatar_url":"https://github.com/bramstein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A JavaScript URI template implementation\n\nThis is a simple URI template implementation following the [RFC 6570 URI Template specification](http://tools.ietf.org/html/rfc6570). The implementation supports all levels defined in the specification and is extensively tested.\n\n## Installation\n\nFor use with Node.js or build tools you can install it through npm:\n\n```sh\n$ npm install url-template\n```\n\nIf you want to use it directly in a browser use a CDN like [Skypack](https://www.skypack.dev/view/url-template).\n\n## Example\n\n```js\nimport { parseTemplate } from 'url-template';\n\nconst emailUrlTemplate = parseTemplate('/{email}/{folder}/{id}');\nconst emailUrl = emailUrlTemplate.expand({\n  email: 'user@domain',\n  folder: 'test',\n  id: 42\n});\n\nconsole.log(emailUrl);\n// Returns '/user@domain/test/42'\n```\n\n## A note on error handling and reporting\n\nThe RFC states that errors in the templates could optionally be handled and reported to the user. This implementation takes a slightly different approach in that it tries to do a best effort template expansion and leaves erroneous expressions in the returned URI instead of throwing errors. So for example, the incorrect expression `{unclosed` will return `{unclosed` as output. The leaves incorrect URLs to be handled by your URL library of choice.\n\n## Supported Node.js versions\n\nThe same versions that are [actively supported by Node.js](https://github.com/nodejs/release#release-schedule) are also supported by `url-template`, older versions of Node.js might be compatible as well, but are not actively tested against.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramstein%2Furl-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbramstein%2Furl-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramstein%2Furl-template/lists"}