# rrpf

> Reliable relative path of the file

Latest version **0.0.4** (published 2022-08-21) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-08-21 |
| First published | 2022-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Liam Shi |
| Maintainers | liamrad |

## Links

- npm: https://www.npmjs.com/package/rrpf
- Repository: https://github.com/liamrad/rrpf
- Homepage: https://github.com/liamrad/rrpf#readme
- Issues: https://github.com/liamrad/rrpf/issues
- Funding: https://github.com/sponsors/liamrad
- npm.io page: https://npm.io/package/rrpf

## Recent versions

- 0.0.4 (latest) — 2022-08-21
- 0.0.3 — 2022-08-21
- 0.0.2 — 2022-08-21

## README

# rrpf

[![NPM version](https://img.shields.io/npm/v/rrpf?color=a1b858&label=)](https://www.npmjs.com/package/rrpf)

Reliable relative path of the file

## Why

When i use `npx` to execute a '.js' file that contains references to files in relative path, file had been looking for based on the path where the `npx` is executed.

That's certainly not what I wanted, the path that based on '.js' file is what I expected.

## Install

```bash
npm i rrpf
```

## Usage

```js
// module
import rrpf from 'rrpf'
// or commonjs
const rrpf = require('rrpf')

rrpf('./path/to/file/foo.*')
```

## Example

```
|-- project
    |-- a.js
    |-- b.js
```

```js
// a.js
import rrpf from 'rrpf'

rrpf('./b.js') // /path/to/project/b.js
```

## Sponsors

<p align="center">
  <a href="https://cdn.jsdelivr.net/gh/liamrad/static/sponsors.svg">
    <img src='https://cdn.jsdelivr.net/gh/liamrad/static/sponsors.svg'/>
  </a>
</p>

## License

[MIT](./LICENSE) License © 2022 [Liam Shi](https://github.com/liamrad)

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