1.0.1 • Published 6 years ago
packageroot v1.0.1
packageroot
return the closest parent or current directory that contains a package.json
example
var packageroot = require('packageroot');
packageroot('./',function(err,root){
console.log(root);
// if im in /root/package/test it would print
// /root/package
});