# seebigs-resolve

> Resolve file paths to actual module contents

Latest version **2.0.0** (published 2018-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install seebigs-resolve
pnpm add seebigs-resolve
yarn add seebigs-resolve
bun add seebigs-resolve
```

## 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 | 2.0.0 |
| Published | 2018-10-31 |
| First published | 2016-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chris Bigelow |
| Maintainers | seebigs |

## Links

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

## Dependencies (2)

- [browser-resolve](https://npm.io/package/browser-resolve.md) ^1.11.2
- [require-resolve](https://npm.io/package/require-resolve.md) 0.0.2

## Recent versions

- 2.0.0 (latest) — 2018-10-31
- 1.4.0 — 2017-03-30
- 1.3.1 — 2017-02-22
- 1.3.0 — 2017-02-21
- 1.2.0 — 2017-02-21
- 1.1.0 — 2017-01-21
- 1.0.4 — 2017-01-21
- 1.0.3 — 2017-01-06
- 1.0.2 — 2016-10-12
- 1.0.1 — 2016-10-08
- 1.0.0 — 2016-09-09

## README

# seebigs-resolve

Resolve a target string to a single filepath and get the contents of the file at that location

*Follows Node spec: [https://nodejs.org/api/modules.html](https://nodejs.org/api/modules.html)*

## Install

```
$ npm install seebigs-resolve
```

## Resolve

```js
var resolve = require('seebigs-resolve');
var fromFile = __filename;

resolve('/abs/module.js', fromFile);
resolve('../rel/module.js', fromFile);
resolve('npm_module', fromFile);

// returns { contents: '...', path: '/path/to/module.js' }
```

## Paths

Modules can also be resolved from an optional array of paths

```js
var resolve = require('seebigs-resolve');
var fromFile = __filename;
var paths = [
    '../one'
];

resolve('module.js', fromFile, paths);
```

## Browser Field

Force resolve to use the browser field in package.json

```js
var resolve = require('seebigs-resolve');
var fromFile = __filename;

resolve.browser('module.js', fromFile);
```

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