{"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"keywords":["find","parent","dir","root","resolve","walk"],"dist-tags":{"latest":"0.3.0"},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"description":"Finds the first parent directory that contains a given file or directory.","readme":"# find-parent-dir [![build status](https://secure.travis-ci.org/thlorenz/find-parent-dir.png)](http://travis-ci.org/thlorenz/find-parent-dir)\n\nFinds the first parent directory that contains a given file or directory.\n\n    npm install find-parent-dir\n\n```js\n// assuming this is called from a file in a subdirectory of /myprojects/foo which contains .git directory\nvar findParentDir = require('find-parent-dir');\n\nfindParentDir(__dirname, '.git', function (err, dir) {\n  // has err if some file access error occurred\n  console.log(dir); // => /myprojects/foo/\n  \n  // if parent dir wasn't found, dir is null\n})\n\n// Same using `sync` method\nvar dir;\ntry { \n  dir = findParentDir.sync(__dirname, '.git');\n  console.log(dir); // => /myprojects/foo/\n  // if parent dir wasn't found, dir is null\n} catch(err) {\n  console.error('error', err); \n}\n```\n","repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"users":{"fabien0102":true,"alimaster":true},"bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"license":"MIT","versions":{"0.1.0":{"name":"find-parent-dir","version":"0.1.0","description":"Finds the first parent directory that contains a given file or directory.","main":"find-parent-dir.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"homepage":"https://github.com/thlorenz/find-parent-dir","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"keywords":["find","parent","dir","root","resolve","walk"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":"MIT","engine":{"node":">=0.6"},"_id":"find-parent-dir@0.1.0","dist":{"shasum":"101b8eca4fb27b94263187a2fadc56b95caa87d4","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-parent-dir/-/find-parent-dir-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.2.0":{"name":"find-parent-dir","version":"0.2.0","description":"Finds the first parent directory that contains a given file or directory.","main":"find-parent-dir.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"homepage":"https://github.com/thlorenz/find-parent-dir","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"keywords":["find","parent","dir","root","resolve","walk"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":"MIT","engine":{"node":">=0.6"},"bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"_id":"find-parent-dir@0.2.0","dist":{"shasum":"445c637d9824a57ec6b8f3877f24f29517f19761","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-parent-dir/-/find-parent-dir-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.2.1":{"name":"find-parent-dir","version":"0.2.1","description":"Finds the first parent directory that contains a given file or directory.","main":"find-parent-dir.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"homepage":"https://github.com/thlorenz/find-parent-dir","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"keywords":["find","parent","dir","root","resolve","walk"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":"MIT","engine":{"node":">=0.6"},"bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"_id":"find-parent-dir@0.2.1","dist":{"shasum":"d5cb7b0b4de8246530b62f8e5e9776c724bdd8a5","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-parent-dir/-/find-parent-dir-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}},"0.3.0":{"name":"find-parent-dir","version":"0.3.0","description":"Finds the first parent directory that contains a given file or directory.","main":"find-parent-dir.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"homepage":"https://github.com/thlorenz/find-parent-dir","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"keywords":["find","parent","dir","root","resolve","walk"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":"MIT","engine":{"node":">=0.6"},"bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"_id":"find-parent-dir@0.3.0","dist":{"shasum":"33c44b429ab2b2f0646299c5f9f718f376ff8d54","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/find-parent-dir/-/find-parent-dir-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{}}},"name":"find-parent-dir","time":{"modified":"2017-03-11T04:41:31.284Z","created":"2013-05-25T22:32:33.214Z","0.1.0":"2013-05-25T22:32:34.501Z","0.2.0":"2014-01-27T20:07:50.035Z","0.2.1":"2014-02-03T04:07:38.307Z","0.3.0":"2014-03-29T16:36:11.160Z"},"readmeFilename":"README.md","homepage":"https://github.com/thlorenz/find-parent-dir"}