Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
return the closest parent or current directory that contains a package.json
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.travis.yml
README.md
index.js
package.json

README.md

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

Something went wrong with that request. Please try again.