{"id":18687247,"url":"https://github.com/junosuarez/url-relative","last_synced_at":"2025-04-12T05:26:43.729Z","repository":{"id":26453666,"uuid":"29904841","full_name":"junosuarez/url-relative","owner":"junosuarez","description":"calculate RFC 1808 relative URLs (inverse of url.resolve)","archived":false,"fork":false,"pushed_at":"2021-02-21T19:39:47.000Z","size":26,"stargazers_count":3,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T15:36:38.645Z","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":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junosuarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-27T08:36:21.000Z","updated_at":"2021-02-21T19:39:49.000Z","dependencies_parsed_at":"2022-09-03T18:51:05.321Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/url-relative","commit_stats":null,"previous_names":["jden/url-relative"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Furl-relative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Furl-relative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Furl-relative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Furl-relative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/url-relative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248521314,"owners_count":21118049,"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-07T10:32:05.241Z","updated_at":"2025-04-12T05:26:43.699Z","avatar_url":"https://github.com/junosuarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# url-relative\ncalculate RFC 1808 relative URLs (inverse of url.resolve)\n\n## NOTE:\nI no longer am able to support this package; please use it at your own risk, as is. I recommend switching to an alternative.\n\n## usage\n```js\nvar urlRelative = require('url-relative')\n\nurlRelative('http://foo.com/a/b','http://foo.com/c/d')\n// =\u003e '../c/d'\n\nurlRelative('/a/b', '/a/b/c')\n// =\u003e 'b/c'\n```\n\n\n## api\n### `urlRelative : (from : String, to : String) =\u003e String`\nReturns the shortest relative URL difference between a `from` and a `to` URL. Relative URLs are described in [RFC 1808](https://tools.ietf.org/html/rfc1808).\n\n`from` and `two` can be full URLs (e.g. `http://foo.com/bar`), network location URLs (protocol-relative, e.g. `//foo.com/bar`), or absolute path URLs (e.g. `/bar`).\n\n## installation\n\n    $ npm install url-relative\n\n\n## running the tests\n\nFrom package root:\n\n    $ npm install\n    $ npm test\n\n\n## contributors\n\n- jden \u003cjason@denizac.org\u003e\n\n\n## license\n\nISC. (c) MMXV jden \u003cjason@denizac.org\u003e. See LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Furl-relative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Furl-relative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Furl-relative/lists"}