package-require
v1.0.0
Published
Require Node.js modules relative to the root of your project
Maintainers
Readme
package-require 
Installation
npm install --save package-requireUsage
Require Node.js modules relative to the root of your project. Directories are scanned starting from the current module, towards the root directory, until the root of your project found. The root of your project is considered to be the closest one with a package.json file. Files outside the root of your project cannot be loaded, even if you try loading them with ../../.
const pr = require('package-require');
pr(module, 'lib/my-js-module');