{"id":16485298,"url":"https://github.com/pa-bru/get-file-path","last_synced_at":"2025-10-29T09:15:08.739Z","repository":{"id":57250166,"uuid":"162700067","full_name":"pa-bru/get-file-path","owner":"pa-bru","description":"get a file path from an initial path","archived":false,"fork":false,"pushed_at":"2019-02-27T11:23:58.000Z","size":3,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T04:05:53.188Z","etag":null,"topics":["file","filepath","get","path"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pa-bru.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-12-21T10:19:58.000Z","updated_at":"2018-12-21T12:42:53.000Z","dependencies_parsed_at":"2022-08-24T16:10:17.949Z","dependency_job_id":null,"html_url":"https://github.com/pa-bru/get-file-path","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pa-bru/get-file-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa-bru%2Fget-file-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa-bru%2Fget-file-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa-bru%2Fget-file-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa-bru%2Fget-file-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pa-bru","download_url":"https://codeload.github.com/pa-bru/get-file-path/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pa-bru%2Fget-file-path/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268152595,"owners_count":24204047,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["file","filepath","get","path"],"created_at":"2024-10-11T13:25:22.618Z","updated_at":"2025-10-29T09:15:08.611Z","avatar_url":"https://github.com/pa-bru.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-file-path\n\n[![npm version][npm-badge]][npm]\n\nRetrieve a file path from an initial path.\nA common example is to get the path of a package.json.\n\n**How it works?**\nIf the file isn't at the initial path, it will search in the parent folder, etc.\n\n## Installation\n\n```shell\nnpm i get-file-path\n```\n\n## Usage\n\n```js\ngetFilePath(initialPath, fileToReach)\n```\n\n\u003e By default `fileToReach` is `package.json`\n\ne.g\n\n```js\nimport getFilePath from \"get-file-path\"\n\nconst packagePath = getFilePath(\"./\", \"package.json\")\n\n// packagePath: '/Users/username/Desktop/getFile/package.json'\n```\n\n## License\n\nget-file-path is [MIT-licensed].\n\n[npm-badge]: https://badge.fury.io/js/get-file-path.svg\n[npm]: https://www.npmjs.com/package/get-file-path\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa-bru%2Fget-file-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpa-bru%2Fget-file-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpa-bru%2Fget-file-path/lists"}