1.0.0 • Published 10 years ago
package-path v1.0.0
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.