1.0.0-alpha-6 • Published 6 years ago

find-parent-dir-from-bin v1.0.0-alpha-6

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Find Parent Dir From Bin

Finds the absolute directory path of the app that is using your node module by stepping up to the parent dir of /node_modules

Currently synchronous only.

Installation

npm install find-parent-dir-from-bin --save

Usage

const findParentDir = require('find-parent-dir-from-bin');

// Returns either the absoblute dir or null if it can't be found
const parentDir = findParentDir();