# @brillout/get-parent-dirname

Latest version **0.0.1** (published 2018-03-02) · 0 weekly downloads

## Install

```sh
npm install @brillout/get-parent-dirname
pnpm add @brillout/get-parent-dirname
yarn add @brillout/get-parent-dirname
bun add @brillout/get-parent-dirname
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-03-02 |
| First published | 2018-03-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 997 B |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | brillout |

## Links

- npm: https://www.npmjs.com/package/@brillout/get-parent-dirname
- Repository: https://github.com/brillout/get-parent-dirname
- Homepage: https://github.com/brillout/get-parent-dirname#readme
- Issues: https://github.com/brillout/get-parent-dirname/issues
- npm.io page: https://npm.io/package/@brillout/get-parent-dirname

## Dependencies (2)

- [reassert](https://npm.io/package/reassert.md) 1.1.1
- [parent-module](https://npm.io/package/parent-module.md) ^0.1.0

## Recent versions

- 0.0.1 (latest) — 2018-03-02

## README

<!---






    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.






-->
Get the path of the directory of the parent module.

### Usage Example

~~~js
// /example/baby/index.js

const get_parent_dirname = require('@brillout/get-parent-dirname'); // npm install @brillout/get-parent-dirname

module.exports = () => {detour()};

function detour() {
    // It doesn't matter how many functions are called
    // between our parent module `papa` and our child module `baby`
    run();
}

function run() {
    // Will print the path of the directory of the `papa` module
    console.log(get_parent_dirname());
}
~~~

~~~js
// /example/papa/index.js

const baby = require('../baby');

baby();
~~~

Running `/example/papa/index.js` will print the absolute path of the `/example/papa` directory.

<!---






    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.












    WARNING, READ THIS.
    This is a computed file. Do not edit.
    Edit `/readme.template.md` instead.






-->

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