{"_id":"find-parent-dir","_rev":"88175","name":"find-parent-dir","description":"Finds the first parent directory that contains a given file or directory.","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"time":{"modified":"2021-06-03T10:28:39.000Z","created":"2013-05-25T22:32:34.501Z","0.3.1":"2021-05-14T16:47:33.942Z","0.3.0":"2014-03-29T16:36:11.160Z","0.2.1":"2014-02-03T04:07:38.307Z","0.2.0":"2014-01-27T20:07:50.035Z","0.1.0":"2013-05-25T22:32:34.501Z"},"users":{"fabien0102":true,"alimaster":true,"lgomez":true,"usex":true},"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"repository":{"type":"git","url":"git://github.com/thlorenz/find-parent-dir.git"},"versions":{"0.3.1":{"name":"find-parent-dir","version":"0.3.1","description":"Finds the first parent directory that contains a given file or directory.","main":"index.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"},"gitHead":"cb72631daed3c4bb21af371ce29247fc95d5a2d4","bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"_id":"find-parent-dir@0.3.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.4","dist":{"shasum":"c5c385b96858c3351f95d446cab866cbf9f11125","size":2310,"noattachment":false,"key":"/find-parent-dir/-/find-parent-dir-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-parent-dir/download/find-parent-dir-0.3.1.tgz"},"_npmUser":{"name":"thlorenz","email":"thlorenz10@gmail.com"},"directories":{},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-parent-dir_0.3.1_1621010853803_0.8575633133968164"},"_hasShrinkwrap":false,"publish_time":1621010853942,"_cnpm_publish_time":1621010853942},"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","size":2439,"noattachment":false,"key":"/find-parent-dir/-/find-parent-dir-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-parent-dir/download/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":{},"publish_time":1396110971160,"_cnpm_publish_time":1396110971160,"_hasShrinkwrap":false},"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","size":2440,"noattachment":false,"key":"/find-parent-dir/-/find-parent-dir-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-parent-dir/download/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":{},"publish_time":1391400458307,"_cnpm_publish_time":1391400458307,"_hasShrinkwrap":false},"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","size":2251,"noattachment":false,"key":"/find-parent-dir/-/find-parent-dir-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-parent-dir/download/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":{},"publish_time":1390853270035,"_cnpm_publish_time":1390853270035,"_hasShrinkwrap":false},"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"},"readmeFilename":"README.md","_id":"find-parent-dir@0.1.0","dist":{"shasum":"101b8eca4fb27b94263187a2fadc56b95caa87d4","size":2103,"noattachment":false,"key":"/find-parent-dir/-/find-parent-dir-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/find-parent-dir/download/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":{},"publish_time":1369521154501,"_cnpm_publish_time":1369521154501,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/thlorenz/find-parent-dir","bugs":{"url":"https://github.com/thlorenz/find-parent-dir/issues"},"license":"MIT"}