Return the package path of given module filename.
$ npm install package-path
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.