# residence

> Find project root given current working directory

Latest version **0.0.217** (published 2019-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install residence
pnpm add residence
yarn add residence
bun add residence
```

Provides the command `residence_find_proj_root`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.217 |
| Published | 2019-09-14 |
| First published | 2016-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Olegzandr Denman |
| Maintainers | oresoftware |
| Keywords | search, find root, home, project root, suman |

## Links

- npm: https://www.npmjs.com/package/residence
- Repository: https://github.com/ORESoftware/residence
- Homepage: https://github.com/ORESoftware/residence#readme
- Issues: https://github.com/ORESoftware/residence/issues
- npm.io page: https://npm.io/package/residence

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.217 (latest) — 2019-09-14
- 0.0.216 — 2019-04-11
- 0.0.215 — 2018-09-28
- 0.0.214 — 2018-09-28
- 0.0.213 — 2018-09-21
- 0.0.212 — 2018-08-04
- 0.0.211 — 2018-08-04
- 0.0.210 — 2018-06-24
- 0.0.209 — 2018-06-11
- 0.0.208 — 2018-05-30
- 0.0.207 — 2017-12-28
- 0.0.206 — 2017-10-08
- 0.0.205 — 2017-06-20
- 0.0.204 — 2017-06-20
- 0.0.203 — 2017-06-17
- … 3 more at https://npm.io/package/residence/versions

## README

<br>

[![Version](https://img.shields.io/npm/v/residence.svg?colorB=green)](https://www.npmjs.com/package/residence)


# Residence

Allows you find a root of a project given current working directory (```process.cwd()```)


### Examples

> Looking for the NPM project root, by looking for package.json

```js
import * as residence from 'residence';
const rootPath = residence.findProjectRoot(process.cwd());
// root is either null or a project root path, found by looking for the first package.json file
```


> Looking for a project root, by looking for another file

```js
import * as residence from 'residence';
const rootPath = residence.findRootDir(process.cwd(), '.nlu.json');
// walks up the fs towards '/' and returns the path when it finds the first .nlu.json file
// returns null otherwise.
```

---
_Source: https://npm.io/package/residence · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
