# deepest-common-folder

> Node module that finds the deepest common folder from an array of given paths

Latest version **1.0.0** (published 2018-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install deepest-common-folder
pnpm add deepest-common-folder
yarn add deepest-common-folder
bun add deepest-common-folder
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-06 |
| First published | 2018-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rafael Grigorian |
| Maintainers | rdogg312 |
| Keywords | deepest, common, folder, paths |

## Links

- npm: https://www.npmjs.com/package/deepest-common-folder
- Repository: https://github.com/null93/deepest-common-folder
- Homepage: https://github.com/null93/deepest-common-folder#readme
- Issues: https://github.com/null93/deepest-common-folder/issues
- npm.io page: https://npm.io/package/deepest-common-folder

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-06-06

## README

# deepest-common-folder
> Node module that finds the deepest common folder from an array of given paths

![MIT License](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=for-the-badge)
![Version 1.0.0](https://img.shields.io/badge/Version-1.0.0-lightgrey.svg?style=for-the-badge)
![Travis CI](https://img.shields.io/travis/null93/deepest-common-folder.svg?style=for-the-badge&colorB=9f9f9f)

## About

This module takes in an array of path strings and determines the deepest common folder.  This means that it finds the deepest possible parent folder that is shared by all paths in the passed array.

## Install

```
npm i -S deepest-common-folder
```

## Testing

```
npm run test
```

## Usage

Below is an example of how this module can be used. Please note that if an empty array is passed, then `/` will be returned.  Also if relative paths are used, they will be resolved based on the _CWD_. An absolute path with a trailing `/` will always be returned.  If a non-array is passed, then an exception is thrown.

```javascript
const dcf = require ("deepest-common-folder")

let paths = [
	"/foo/bar",
	"/foo/bar/baz",
	"/foo/baz",
	"/foo/baz/bar"
]

let folder = dcf ( paths )
```

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