# depth

> Returns the depth of a file or directory, e.g. number of folders deep.

Latest version **0.1.1** (published 2014-09-06) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-09-06 |
| First published | 2014-09-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | dir, directories, directory, dirs, file, filepath, files, fp, path, paths, recurse, recursive |

## Links

- npm: https://www.npmjs.com/package/depth
- Repository: https://github.com/jonschlinkert/depth
- Issues: https://github.com/jonschlinkert/depth/issues
- npm.io page: https://npm.io/package/depth

## Dependencies (1)

- [is-directory](https://npm.io/package/is-directory.md) ^0.2.1

## 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

- 0.1.1 (latest) — 2014-09-06
- 0.1.0 — 2014-09-05

## README

# depth

> Returns the depth of a file or directory, e.g. number of folders deep.

## Install
#### Install with [npm](npmjs.org):

```bash
npm i depth --save-dev
```

## Run tests

```bash
npm test
```

## Usage

```js
var depth = require('depth');

console.log(depth('index.js'));
//=> 0
console.log(depth('./node_modules/'));
//=> 1
console.log(depth('./node_modules/verb'));
//=> 2
console.log(depth('./node_modules/verb/index.js'));
//=> 2
```

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license

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