# @nore/resolve

> ES modules file resolve

Latest version **1.1.1** (published 2017-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nore/resolve
pnpm add @nore/resolve
yarn add @nore/resolve
bun add @nore/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 | 1.1.1 |
| Published | 2017-11-20 |
| First published | 2017-01-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Navaru |
| Maintainers | nore |

## Links

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

## Recent versions

- 1.1.1 (latest) — 2017-11-20
- 1.1.0 — 2017-11-20
- 1.0.0 — 2017-01-14

## README

# @nore/resolve

Resolve a module `request`, returning the absolute path of the file.


## Installation

```
  $ npm install @nore/resolve
```

## Use:

```js
import resolve from '@nore/resolve'

const file = resolve({
  request: 'components/button',
  path: '/path/to/project',
  extension: '.css',
  parent: '/path/to/project/source/app/index.js',
})
```

Options:

- `request` — the module request that should be resolved
- `path` — the absolute path of the project, to match local modules
- `extension` — the extension of the file is being requested
- `parent` — the absolute path to the file from which the request was made (optional)


`request` formats:

- absolute paths:
  - `/some/path/to/file.extension`
  - `/path/to/folder`
- relative paths:
  - `./path/to/file.extension`
  - `./path/to/folder`
  - `../folder/file.extension`
  - `../path/to/folder`
- local modules, relative to project `path`:
  - `path/to/file.extension`
  - `path/to/folder`
- modules, loaded from the `node_modules` folder:
  - `jquery`


For example if a request is `/path/to/name` and a file and folder exists with the same name, the file `name.ext` has priority.


---

> License [ISC](https://github.com/nore/resolve/blob/master/license) &nbsp;&middot;&nbsp;
> GitHub [@navaru](https://github.com/navaru) &nbsp;&middot;&nbsp;
> Twitter [@navaru](https://twitter.com/navaru)

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