{"id":16625512,"url":"https://github.com/cushJS/relative","last_synced_at":"2025-09-16T03:32:20.971Z","repository":{"id":55902679,"uuid":"138661177","full_name":"aleclarson/relative","owner":"aleclarson","description":"Ultra fast relative path resolver","archived":false,"fork":false,"pushed_at":"2021-04-01T17:26:38.000Z","size":16,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T19:05:53.930Z","etag":null,"topics":["nodejs","path"],"latest_commit_sha":null,"homepage":"","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/aleclarson.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":"2018-06-25T23:41:50.000Z","updated_at":"2022-12-04T13:09:19.000Z","dependencies_parsed_at":"2022-08-15T09:01:06.665Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/relative","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Frelative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Frelative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Frelative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Frelative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/relative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233200442,"owners_count":18640370,"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":["nodejs","path"],"created_at":"2024-10-12T04:05:58.841Z","updated_at":"2025-09-16T03:32:15.682Z","avatar_url":"https://github.com/aleclarson.png","language":"TypeScript","funding_links":["https://paypal.me/alecdotbiz"],"categories":[],"sub_categories":[],"readme":"# @cush/relative\n\n[![npm](https://img.shields.io/npm/v/@cush/relative.svg)](https://www.npmjs.com/package/@cush/relative)\n[![Bundle size](https://badgen.net/bundlephobia/min/@cush/relative)](https://bundlephobia.com/result?p=@cush/relative)\n[![Code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\nUltra fast relative path resolver ⚡️\n\n```js\nrelative('a/b', './c')    // =\u003e 'a/c'\nrelative('a/b', '.')      // =\u003e 'a'\nrelative('a/b', '..')     // =\u003e ''\nrelative('a/b', '../..')  // =\u003e null\n```\n\nThe first argument is known as \"the module\".\n\nThe second argument is known as \"the relative\".\n\nThe relative must begin with a period. Otherwise, `null` is returned.\n\nThe basename of the module is always ignored.\n\nWhen the module is *not* absolute and the relative is pointing to the root directory, an empty string is returned.\n\nWhen the module is *not* absolute and the relative is pointing outside the root directory, `null` is returned.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcushJS%2Frelative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FcushJS%2Frelative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcushJS%2Frelative/lists"}