{"id":17749430,"url":"https://github.com/oresoftware/residence","last_synced_at":"2025-04-01T08:11:14.825Z","repository":{"id":57152948,"uuid":"52914255","full_name":"ORESoftware/residence","owner":"ORESoftware","description":"Allows you find an NPM root of a project given current working directory","archived":false,"fork":false,"pushed_at":"2019-09-14T06:01:40.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T18:02:59.032Z","etag":null,"topics":["nodejs","npm","project","root","suman","sumanjs"],"latest_commit_sha":null,"homepage":"","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/ORESoftware.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":"2016-03-01T22:16:34.000Z","updated_at":"2019-09-14T06:01:42.000Z","dependencies_parsed_at":"2022-09-03T18:41:20.090Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/residence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fresidence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fresidence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fresidence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fresidence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/residence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604610,"owners_count":20804100,"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","npm","project","root","suman","sumanjs"],"created_at":"2024-10-26T11:23:17.856Z","updated_at":"2025-04-01T08:11:14.807Z","avatar_url":"https://github.com/ORESoftware.png","language":"JavaScript","readme":"\n\u003cbr\u003e\n\n[![Version](https://img.shields.io/npm/v/residence.svg?colorB=green)](https://www.npmjs.com/package/residence)\n\n\n# Residence\n\nAllows you find a root of a project given current working directory (```process.cwd()```)\n\n\n### Examples\n\n\u003e Looking for the NPM project root, by looking for package.json\n\n```js\nimport * as residence from 'residence';\nconst rootPath = residence.findProjectRoot(process.cwd());\n// root is either null or a project root path, found by looking for the first package.json file\n```\n\n\n\u003e Looking for a project root, by looking for another file\n\n```js\nimport * as residence from 'residence';\nconst rootPath = residence.findRootDir(process.cwd(), '.nlu.json');\n// walks up the fs towards '/' and returns the path when it finds the first .nlu.json file\n// returns null otherwise.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fresidence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fresidence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fresidence/lists"}