# package-lookup

> Info about the package given a filename.

Latest version **0.1.2** (published 2013-10-02) · MIT license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2013-10-02 |
| First published | 2013-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bjarke Walling |
| Maintainers | walling |

## Links

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

## Recent versions

- 0.1.2 (latest) — 2013-10-02
- 0.1.1 — 2013-02-07
- 0.1.0 — 2013-02-07

## README

package-lookup
==============

Info about the package given a filename.

Install:

```bash
npm install package-lookup
```

Usage:

```javascript
var pkg = require('package-lookup');

// Display current package: The two gives the same result.
console.log(pkg.resolve(__filename));
console.log(pkg.resolveDir(__dirname));

// Info about socket.io (if it's in the path).
console.log(pkg.resolve(require.resolve('socket.io')));
```

Functions:

 *  pkg.resolve(filename)
 *  pkg.resolveDir(dirname)

The package info includes the properties `_filename` and `_dirname` that gives the filename and directory of the package.json file.

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