package-path

1.0.0 • Public • Published

package-path

Return the package path of given module filename.

Install

$ npm install package-path

Usage

var packagePath = require('package-path')
 
packagePath('/path/to/a/module.js', function (projectPath) {
 
  projectPath
  // => /path/to/the/package
 
});

Sync:

packagePath.sync('/path/to/a/module.js')
// => /path/to/the/package

See test/index.js for more info.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i package-path

    Weekly Downloads

    27

    Version

    1.0.0

    License

    BSD

    Last publish

    Collaborators

    • meesles