# back-to-path-from

> Start the path from x directory

Latest version **1.0.2** (published 2018-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install back-to-path-from
pnpm add back-to-path-from
yarn add back-to-path-from
bun add back-to-path-from
```

## 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.0.2 |
| Published | 2018-07-29 |
| First published | 2018-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sourice vincent |
| Maintainers | sousou |
| Keywords | path, from, back, down, to |

## Links

- npm: https://www.npmjs.com/package/back-to-path-from
- Repository: https://github.com/souricevincent/back-to-path-from
- Homepage: https://github.com/souricevincent/back-to-path-from#readme
- Issues: https://github.com/souricevincent/back-to-path-from/issues
- npm.io page: https://npm.io/package/back-to-path-from

## Dependencies (1)

- [path](https://npm.io/package/path.md) ^0.12.7

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

- 1.0.2 (latest) — 2018-07-29
- 1.0.1 — 2018-07-29
- 1.0.0 — 2018-07-29

## README

# back-to-path-from (nodejs)

back-to-path-from allows you to start a path from an earlier starting point.
part of the end to go up.

## Install

`npm install back-to-path-from`

## running
in your project include the library

`const backTo = require('back-to-path-from');`

## example
```
let result = backTo.pathFrom('/User/themes/custom', 2);
console.log(result);
--> /themes/custom
```

or, with a dirname

```
console.log(__dirname);
--> User/path/to/My/project

let result = backTo.pathFrom(__dirname, 3);
console.log(result);
--> /path/to/My/project
```

For the current directory :
```
console.log(__dirname);
--> User/path/to/My/project

let result = backTo.pathFrom(__dirname, 1);
console.log(result);
--> /project
```

Works for windows and mac paths

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