{"_id":"closest-package","_rev":"5-ba016dffa485b2c6bd67e14e16f7fbdc","name":"closest-package","description":"Find the closest package.json file meeting specific criteria","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"closest-package","version":"1.0.0","description":"Find the closest package.json file meeting specific criteria","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"deep-equal":"^0.2.1","tap-spec":"^0.2.0","tape":"^2.14.0"},"repository":{"type":"git","url":"git://github.com/hughsk/closest-package.git"},"keywords":["package","json","parse","find","up","closest"],"homepage":"https://github.com/hughsk/closest-package","bugs":{"url":"https://github.com/hughsk/closest-package/issues"},"gitHead":"6a9d9796e5d6a857e6897ca9f78085cdcbca30ef","_id":"closest-package@1.0.0","_shasum":"ef7a73ad90baae43a89db53777b20fcc0350d4cf","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"ef7a73ad90baae43a89db53777b20fcc0350d4cf","tarball":"https://registry.npmjs.org/closest-package/-/closest-package-1.0.0.tgz","integrity":"sha512-hIZe/lw4KwrQOpxFV9KHuY0Hqq9SAfoQr1ZzQnDq5SrA7RWKT2FnKaF9HRmMXjW2hujpHBeASFVSWa5xmwR1RA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEesqvhDJuvRWWyRDSzl576mw0/EkSAst94YLl/1WVDAiBQlC9TsHUv0aI3QI3sZTpxgg2oDAsyAmHoBHfKies3kQ=="}]}}},"readme":"# closest-package [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\nFind the closest package.json file meeting specific criteria by searching\nupwards from a given directory until hitting root.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/closest-package.png)](https://nodei.co/npm/closest-package/)\n\n### `closest(dir, [filter], found(err, file))`\n\nGiven a starting directory `dir`, look up through every directory to see if\nit contains a `package.json` file matching the `filter` function, for example:\n\n``` javascript\nclosest(__dirname, function(json, filename) {\n  return json.name === 'async'\n}, function(err, file) {\n  console.log(file)\n})\n```\n\nNote that `filter` is optional and takes the following arguments:\n\n* `json`: the parsed `package.json` file.\n* `filename`: the `package.json`'s absolute filename.\n\n### `file = closest.sync(dir, [filter])`\n\nSame as the `closest` function, however executed synchronously:\n\n``` javascript\nvar result = closest.sync(__dirname, function(json, filename) {\n  return json.name === 'async'\n})\n\nconsole.log(result)\n```\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/hughsk/closest-package/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"time":{"modified":"2022-06-13T06:11:49.311Z","created":"2014-08-07T22:05:29.959Z","1.0.0":"2014-08-07T22:05:29.959Z"},"homepage":"https://github.com/hughsk/closest-package","keywords":["package","json","parse","find","up","closest"],"repository":{"type":"git","url":"git://github.com/hughsk/closest-package.git"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"bugs":{"url":"https://github.com/hughsk/closest-package/issues"},"license":"MIT","readmeFilename":"README.md","users":{"shriek":true}}