package-path
v1.0.0
Published
Return the package path of given module filename
Readme
package-path
Return the package path of given module filename.
Install
$ npm install package-pathUsage
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/packageSee test/index.js for more info.
