{"_id":"@choojs/findup","_rev":"6-1c95c48f30c5fe709a36b3e63c689392","name":"@choojs/findup","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"author":{"name":"Filirom1","email":"filirom1@gmail.com"},"name":"@choojs/findup","description":"Walk up ancester's dir up to root","version":"0.2.0","repository":{"type":"git","url":"git+https://github.com/choojs/findup.git"},"bin":{"findup":"bin/findup.js"},"scripts":{"test":"mocha ./test/*.js"},"dependencies":{"commander":"^2.15.1"},"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5"},"license":"MIT","gitHead":"e71b5723961d730017e96018d2ec9f7519f7a41f","bugs":{"url":"https://github.com/choojs/findup/issues"},"homepage":"https://github.com/choojs/findup#readme","_id":"@choojs/findup@0.2.0","_npmVersion":"5.8.0","_nodeVersion":"9.11.1","_npmUser":{"name":"goto-bus-stop","email":"rene@kooi.me"},"dist":{"integrity":"sha512-jG8+ezKlhXaigbCTxLJas1uMB/3PCXZ/VxvtVys1M+eBE4L5swy9FX0ox1jSuTxUHjwcxnOI7lBS7vDNja9mDg==","shasum":"7103d625cf9001295d65c086faeffb11c8fabc9c","tarball":"https://registry.npmjs.org/@choojs/findup/-/findup-0.2.0.tgz","fileCount":10,"unpackedSize":13213,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKyBUBQOkjk4lZzmevjoWpNqqLJ/ufaBAu7qb+D3wHiwIgMgjjdgW7pZHAmWHSjKLWAUl/+zuJfQEbGf7OPrDakEY="}]},"maintainers":[{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},{"name":"almost","email":"tom@almostobsolete.net"},{"name":"amongiants","email":"jon@folderstudio.com"},{"name":"benlyn","email":"bendik.lynghaug@gmail.com"},{"name":"bret","email":"bcomnes@gmail.com"},{"name":"colingourlay","email":"colin@colin-gourlay.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"feross","email":"feross@feross.org"},{"name":"freeman-lab","email":"the.freeman.lab@gmail.com"},{"name":"goto-bus-stop","email":"rene@kooi.me"},{"name":"graforlock","email":"neatcube@gmail.com"},{"name":"jameskyburz","email":"james.kyburz@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"maxogden","email":"max@maxogden.com"},{"name":"s3ththompson","email":"s3th.thompson@gmail.com"},{"name":"sethvincent","email":"sethvincent@gmail.com"},{"name":"shama","email":"kyle@dontkry.com"},{"name":"slaskis","email":"robert@publicclass.se"},{"name":"substack","email":"substack@gmail.com"},{"name":"timwis","email":"tim@timwis.com"},{"name":"toddself","email":"todd@selfassembled.org"},{"name":"tornqvist","email":"calle.tornqvist@gmail.com"},{"name":"ungoldman","email":"ungoldman@gmail.com"},{"name":"yerkopalma","email":"yerko.palma@usach.cl"},{"name":"yoshuawuyts","email":"yoshuawuyts@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/findup_0.2.0_1523447851600_0.5494045197613664"},"_hasShrinkwrap":false},"0.2.1":{"name":"@choojs/findup","description":"Find a file by walking up the directory tree","version":"0.2.1","author":{"name":"Filirom1","email":"filirom1@gmail.com"},"bin":{"findup":"bin/findup.js"},"bugs":{"url":"https://github.com/choojs/findup/issues"},"dependencies":{"commander":"^2.15.1"},"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5"},"homepage":"https://github.com/choojs/findup","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/choojs/findup.git"},"scripts":{"test":"mocha ./test/*.js"},"gitHead":"cbdcbdc8896a123ac83f41f82ae8d4ec2809a97e","_id":"@choojs/findup@0.2.1","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"goto-bus-stop","email":"rene@kooi.me"},"dist":{"integrity":"sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw==","shasum":"ac13c59ae7be6e1da64de0779a0a7f03d75615a3","tarball":"https://registry.npmjs.org/@choojs/findup/-/findup-0.2.1.tgz","fileCount":10,"unpackedSize":13445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEQSPCRA9TVsSAnZWagAAnxgQAKFH1ikrPHJs3qhZhYBA\nq5VaIbG8s7th74EiEHyFOqS/fZoxmQX+ZrQyLFe7/WU+KmnYf50NX5B2AjaU\noyReKerfYmOmXp72RdPDuay8KSGmIvGUk8/p9+bAbAmpTfIIcqQIr8ZrKNjy\ns5K706Ba6ou2fiEZctbPwFGdlGdDDQseWazEcImQdpAWFdWa5O7HEs6c5Mu2\nXqA/tbjS9TtU4OVCSY1WIkynvi9pUbNtrfF3GYobQf1FTUeyJ4IC1JECaIcc\nhsff/tBAtsHsJm/e0gbQgxan8JSVOEoiny/LzwkYfE+AVkJYVqqyFXpm+9ms\nCX1Y0CODpLJ/9bQ0t7dQlgZCsoYjd3BuapR1mGmUkoOjKPBjky4p+pja1mqj\nJMrq9dX2XDq7gyqiff/uXTBzN7Kf0kkpWr/nvEZddioWF0cVEXSk9NFqtpzX\n5KheGHDRVhNXY41UDVdhnJ9Uzla3zgDQmQNNpsY7trpxzMfb0KZjUymdmumP\nLwrTyp2qh0RGbk9ZYbNsaMHAgLH39drj7vbVxlcZpwE7wUQLiAQUfli5mHTD\nLRaCfTG3NGOHbhs+3bsclw76JatVGNXzK2CBxSTpj8kp3NRSFNCOxOqiCchm\nm6a4Wlmkg0g43gW4gVNrqRgCoe/fxs2fL4Xrmc1W7gtyLLIgBHnhjK1uPEv7\nXNjB\r\n=DELZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4q4SFjeEMCe6u0iiC/gnKxBEZurGkT0rqAN8Q9lTFdgIhAII7e9eNgNpGvrWBoBVz6FLM8xVcjVN56DzR5y15RxYQ"}]},"maintainers":[{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},{"name":"almost","email":"tom@almostobsolete.net"},{"name":"amongiants","email":"jon@folderstudio.com"},{"name":"benlyn","email":"bendik.lynghaug@gmail.com"},{"name":"bret","email":"bcomnes@gmail.com"},{"name":"colingourlay","email":"colin@colin-gourlay.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"feross","email":"feross@feross.org"},{"name":"freeman-lab","email":"the.freeman.lab@gmail.com"},{"name":"goto-bus-stop","email":"rene@kooi.me"},{"name":"graforlock","email":"neatcube@gmail.com"},{"name":"jameskyburz","email":"james.kyburz@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"lrlna","email":"shestak.irina@gmail.com"},{"name":"maxogden","email":"max@maxogden.com"},{"name":"s3ththompson","email":"s3th.thompson@gmail.com"},{"name":"sethvincent","email":"sethvincent@gmail.com"},{"name":"shama","email":"kyle@dontkry.com"},{"name":"slaskis","email":"robert@publicclass.se"},{"name":"substack","email":"substack@gmail.com"},{"name":"timwis","email":"tim@timwis.com"},{"name":"toddself","email":"todd@selfassembled.org"},{"name":"tornqvist","email":"calle.tornqvist@gmail.com"},{"name":"ungoldman","email":"ungoldman@gmail.com"},{"name":"yerkopalma","email":"yerko.palma@usach.cl"},{"name":"yoshuawuyts","email":"yoshuawuyts@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/findup_0.2.1_1527841933362_0.8682408920673526"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-11T11:57:31.532Z","0.2.0":"2018-04-11T11:57:31.690Z","modified":"2023-11-02T16:31:56.383Z","0.2.1":"2018-06-01T08:32:14.533Z"},"maintainers":[{"email":"reinstein.mike@gmail.com","name":"mreinstein"},{"email":"bendik.lynghaug@gmail.com","name":"benlyn"},{"email":"s3th.thompson@gmail.com","name":"s3ththompson"},{"email":"javascript@yosh.is","name":"yoshuawuyts"},{"email":"bcomnes@gmail.com","name":"bret"},{"email":"shestak.irina@gmail.com","name":"lrlna"},{"email":"yerko.palma@usach.cl","name":"yerkopalma"},{"email":"julian@juliangruber.com","name":"juliangruber"},{"email":"tim@timwis.com","name":"timwis"},{"email":"michael.williams@enspiral.com","name":"ahdinosaur"},{"email":"todd@selfassembled.org","name":"toddself"},{"email":"sethvincent@gmail.com","name":"sethvincent"},{"email":"max@maxogden.com","name":"maxogden"},{"email":"kyle@dontkry.com","name":"shama"},{"email":"jeremy.freeman@mac.com","name":"freeman-lab"},{"email":"feross@feross.org","name":"feross"},{"email":"github@tixz.dk","name":"emilbayes"},{"email":"colin@colin-gourlay.com","name":"colingourlay"},{"email":"james.kyburz@gmail.com","name":"jameskyburz"},{"email":"tom@almostobsolete.net","name":"almost"},{"email":"robert@publicclass.se","name":"slaskis"},{"email":"ungoldman@gmail.com","name":"ungoldman"},{"email":"neatcube@gmail.com","name":"graforlock"},{"email":"carl@tornqv.ist","name":"tornqvist"},{"email":"jon@folderstudio.com","name":"amongiants"},{"email":"npm@asdf.kooi.me","name":"goto-bus-stop"},{"email":"mathiasbuus@gmail.com","name":"mafintosh"}],"description":"Find a file by walking up the directory tree","homepage":"https://github.com/choojs/findup","repository":{"type":"git","url":"git+https://github.com/choojs/findup.git"},"author":{"name":"Filirom1","email":"filirom1@gmail.com"},"bugs":{"url":"https://github.com/choojs/findup/issues"},"license":"MIT","readme":"[![build status](https://secure.travis-ci.org/choojs/findup.png)](http://travis-ci.org/choojs/findup)\n@choojs/findup\n=======\n\n> This is a fork of [Filirom1/findup](https://github.com/Filirom1/findup), pending [#16](https://github.com/Filirom1/findup/pull/16).\n\n### Install\n\n```sh\nnpm install -g @choojs/findup\n```\n\n### Usage\n\nFind up a file in ancestor's dir\n\n\n    .\n    ├── config.json\n    └── f\n        └── e\n            └── d\n                └── c\n                    ├── b\n                    │   └── a\n                    └── config.json\n\n### Options\n\n- `maxdepth`: (Number, default -1) How far to traverse before giving up. If maxdepth is `-1`, then there is no limit.\n\n#### Async\n\nfindup(dir, fileName, options, callback)\nfindup(dir, iterator, options, callback) with `iterator(dir, cb)` where cb only accept `true` or `false`\n\n```js\nvar findup = require('@choojs/findup');\n\n\nfindup(__dirname + '/f/e/d/c/b/a', 'config.json', function(err, dir){\n  // if(e) e === new Error('not found')\n  // dir === '/f/e/d/c'\n});\n```\n\nor\n\n```js\nfindup(__dirname + '/f/e/d/c/b/a', function(dir, cb){\n  require('path').exists(dir + '/config.json', cb);\n}, function(err, dir){\n  // if(e) e === new Error('not found')\n  // dir === '/f/e/d/c'\n});\n```\n\n#### EventEmitter\n\nfindup(dir, fileName, options)\n\n```js\nvar findup = require('@choojs/findup');\nvar fup = findup(__dirname + '/f/e/d/c/b/a', 'config.json');\n```\n\nfindup(dir, iterator, options) with `iterator(dir, cb)` where cb only accept `true` or `false`\n\n```js\nvar findup = require('@choojs/findup');\nvar fup = findup(__dirname + '/f/e/d/c/b/a', function(dir, cb){\n  require('path').exists(dir + '/config.json', cb);\n});\n```\n\nfindup return an EventEmitter. 3 events are emitted: `found`, `error`, `end`\n\n`found` event is emitted each time a file is found.\n\nYou can stop the traversing by calling `stop` manually.\n\n```js\nfup.on('found', function(dir){\n  // dir === '/f/e/d/c'\n  fup.stop();\n});\n```\n\n`error` event is emitted when error happens\n\n```js\nfup.on('error', function(e){\n  // if(e) e === new Error('not found')\n});\n```\n\n`end` event is emitted at the end of the traversing or after `stop()` is\ncalled.\n\n```js\nfup.on('end', function(){\n  // happy end\n});\n```\n\n#### Sync\n\nfindup(dir, fileName)\nfindup(dir, iteratorSync) with `iteratorSync` return `true` or `false`\n```js\nvar findup = require('@choojs/findup');\n\ntry{\n  var dir = findup.sync(__dirname + '/f/e/d/c/b/a', 'config.json'); // dir === '/f/e/d/c'\n}catch(e){\n  // if(e) e === new Error('not found')\n}\n```\n\n#### CLI\n```js\nnpm install -g @choojs/findup\n\n$ cd test/fixture/f/e/d/c/b/a/\n$ findup package.json\n/root/findup/package.json\n```\n\nUsage\n\n```\n$ findup -h\n\nUsage: findup [FILE]\n\n    --name, -n       The name of the file to found\n    --dir, -d        The directoy where we will start walking up    $PWD\n    --help, -h       show usage                                     false\n    --verbose, -v    print log                                      false\n```\n\n### LICENSE MIT\n\n### Read the tests :)\n","readmeFilename":"README.md"}