# package-path

> Return the package path of given module filename

Latest version **1.0.0** (published 2016-04-12) · BSD license · 0 weekly downloads

## Install

```sh
npm install package-path
pnpm add package-path
yarn add package-path
bun add package-path
```

## 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 | 2016-04-12 |
| First published | 2014-04-24 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | azer |
| Maintainers | meesles |
| Keywords | package, path, root |

## Links

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

## 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) — 2016-04-12
- 0.0.1-security — 2016-03-23
- 2.0.0 — 2016-03-22
- 0.0.1 — 2014-04-24
- 0.0.0 — 2014-04-24

## README

## package-path

Return the package path of given module filename.

## Install

```bash
$ npm install package-path
```

## Usage

```js
var packagePath = require('package-path')

packagePath('/path/to/a/module.js', function (projectPath) {

  projectPath
  // => /path/to/the/package

});
```

Sync:

```js
packagePath.sync('/path/to/a/module.js')
// => /path/to/the/package
```

See `test/index.js` for more info.

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