# node-path-choice

> Gets you the root of your source file directory easily and better than rootpath.

Latest version **4.0.0** (published 2021-06-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-path-choice
pnpm add node-path-choice
yarn add node-path-choice
bun add node-path-choice
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-06-06 |
| First published | 2017-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anubhav |
| Maintainers | iamanubhavsaini, git.faf |
| Keywords | node-path, node-path-choice, path, rootpath, relative, path, absolute, path |

## Links

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

## 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

- 4.0.0 (latest) — 2021-06-06
- 3.0.0 — 2021-05-23
- 2.0.0 — 2017-12-25
- 1.0.2 — 2017-09-18
- 1.0.1 — 2017-05-06
- 1.0.0 — 2017-04-29

## README

# node-path-choice

Get the path to the source directory and save it in env once.

Relative and absolute path are available.

Absolute: you can just set your path blatantly in process.env.NODE_PATH

## Usage

```JavaScript
    // put this in your index.js or app.js (just once in a project and that becomes root)
    require('node-path-choice').blatant(__dirname)
```

## This should replace rootpath node_module in your repo.

`rootpath()` is waste of cpu cycles. Use this instead.

## license

MIT

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