npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

packageroot

1.0.1 • Public • Published

Build Status

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 
});
 
 

Keywords

install

npm i packageroot

Downloadsweekly downloads

76

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability