# mono-root

> find the root path in monorepos

Latest version **0.0.8** (published 2017-04-03) · 0 weekly downloads

## Install

```sh
npm install mono-root
pnpm add mono-root
yarn add mono-root
bun add mono-root
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2017-04-03 |
| First published | 2017-03-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | James |
| Maintainers | aretecode |
| Keywords | helpers, utils, debugging, fliphub, flipbox |

## Links

- npm: https://www.npmjs.com/package/mono-root
- Repository: https://github.com/fliphub/fliphub
- Homepage: https://github.com/fliphub/fliphub#readme
- Issues: https://github.com/fliphub/fliphub/issues
- npm.io page: https://npm.io/package/mono-root

## Dependencies (2)

- [flipfile](https://npm.io/package/flipfile.md) *
- [app-root-path](https://npm.io/package/app-root-path.md) ^2.0.1

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2017-04-03
- 0.0.6 — 2017-03-26
- 0.0.5 — 2017-03-26
- 0.0.3 — 2017-03-16
- 0.0.2 — 2017-03-16
- 0.0.1 — 2017-03-16

## README

# 🥕 mono-root

> find the root path in monorepos

### simple

```js
const {resolve} = require('path')
const monoRoot = require('mono-root')()

const pkg = resolve(monoroot, './package.json')
console.log(pkg)
```

### advanced

- the max `depth` it goes up can be customized
- and it can be returned as an object (`asObj`) to see the paths it used

```js
const {resolve} = require('path')
const monoRoot = require('mono-root')

const {
  nearest,
  farthest,
  attempt,
  found,
} = monoRoot({depth: 4, asObj: true})
```

## more
- see [fliphub-resolve](https://www.npmjs.com/package/fliphub-resolve) for more verbose use that resolves objects, arrays, with multiple scopes.

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