{"_id":"find-pkg","_rev":"26144","name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"jonschlinkert","email":""}],"time":{"modified":"2023-03-27T17:15:01.000Z","created":"2015-11-28T03:09:01.718Z","2.0.0":"2018-03-28T05:59:24.265Z","1.0.0":"2017-05-20T04:23:24.376Z","0.1.2":"2016-06-05T10:37:57.180Z","0.1.1":"2015-12-20T12:50:56.138Z","0.1.0":"2015-11-28T03:09:01.718Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"versions":{"2.0.0":{"name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.","version":"2.0.0","homepage":"https://github.com/jonschlinkert/find-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=8"},"scripts":{"test":"mocha"},"dependencies":{"find-file-up":"^2.0.1"},"devDependencies":{"delete":"^1.1.0","gulp-format-md":"^1.0.0","mocha":"^3.5.3","resolve-dir":"^1.0.1"},"keywords":["filepath","find","findup","findup-sync","json","lookup","package","package-json","pkg","resolve","sync"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["find-file-up","findup-sync","global-modules"]},"lint":{"reflinks":true}},"gitHead":"719515919029937f4619cb8107a8290240eb19e4","_id":"find-pkg@2.0.0","_npmVersion":"5.8.0","_nodeVersion":"9.9.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"3a7c35c704e11a6e5722c56e45bd7e587507735e","size":2740,"noattachment":false,"key":"/find-pkg/-/find-pkg-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/find-pkg/download/find-pkg-2.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-pkg_2.0.0_1522216764226_0.20853675363498803"},"_hasShrinkwrap":false,"publish_time":1522216764265,"_cnpm_publish_time":1522216764265},"1.0.0":{"name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/find-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"find-file-up":"^1.0.2"},"devDependencies":{"delete":"^1.0.1","gulp-format-md":"^0.1.12","mocha":"^3.4.1","resolve-dir":"^1.0.0"},"keywords":["filepath","find","findup","findup-sync","json","lookup","package","package-json","pkg","resolve","sync"],"verb":{"related":{"list":["find-file-up","load-module-pkg","load-pkg","look-up","module-root"]},"reflinks":["find-file-up","look-up","verb"],"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"gitHead":"5bd9abd2d72779cb25462b6e073984d1c0ee724b","_id":"find-pkg@1.0.0","_shasum":"96db242e001c7c55025d32213302ea3aba677177","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":""}],"dist":{"shasum":"96db242e001c7c55025d32213302ea3aba677177","size":2649,"noattachment":false,"key":"/find-pkg/-/find-pkg-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/find-pkg/download/find-pkg-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-pkg-1.0.0.tgz_1495254203346_0.5638200419489294"},"directories":{},"publish_time":1495254204376,"_hasShrinkwrap":false,"_cnpm_publish_time":1495254204376},"0.1.2":{"name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/find-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"find-file-up":"^0.1.2"},"devDependencies":{"delete":"^0.3.2","gulp-format-md":"^0.1.9","mocha":"^2.5.3","resolve-dir":"^0.1.0"},"keywords":["filepath","find","findup","findup-sync","json","lookup","package","package-json","pkg","resolve","sync"],"verb":{"related":{"list":["find-file-up","load-module-pkg","load-pkg","look-up","module-root"]},"reflinks":["find-file-up","look-up","verb"],"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"gitHead":"e319e9e46c44f1c4e842fc711dca853bfada36a9","_id":"find-pkg@0.1.2","_shasum":"1bdc22c06e36365532e2a248046854b9788da557","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":""}],"dist":{"shasum":"1bdc22c06e36365532e2a248046854b9788da557","size":1598,"noattachment":false,"key":"/find-pkg/-/find-pkg-0.1.2.tgz","tarball":"http://name.csiicloud.com:7001/find-pkg/download/find-pkg-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/find-pkg-0.1.2.tgz_1465123074957_0.34422014583833516"},"directories":{},"publish_time":1465123077180,"_cnpm_publish_time":1465123077180,"_hasShrinkwrap":false},"0.1.1":{"name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/find-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"find-file-up":"^0.1.1"},"devDependencies":{"delete":"^0.2.1","mocha":"*","resolve-dir":"^0.1.0"},"verb":{"related":{"list":["find-file-up","look-up","load-pkg","load-module-pkg","module-root"]}},"gitHead":"dbb96b2ca9d3305781c719a6bea4fe7852b1bc0e","_id":"find-pkg@0.1.1","_shasum":"fba1b96a75ee2e1f298bb477d264b0b44c79144b","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":""}],"dist":{"shasum":"fba1b96a75ee2e1f298bb477d264b0b44c79144b","size":2218,"noattachment":false,"key":"/find-pkg/-/find-pkg-0.1.1.tgz","tarball":"http://name.csiicloud.com:7001/find-pkg/download/find-pkg-0.1.1.tgz"},"directories":{},"publish_time":1450615856138,"_cnpm_publish_time":1450615856138,"_hasShrinkwrap":false},"0.1.0":{"name":"find-pkg","description":"Find the first directory with a package.json, recursing up, starting with the given directory.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/find-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/find-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"find-file-up":"^0.1.0"},"devDependencies":{"delete":"^0.2.1","mocha":"*","resolve-dir":"^0.1.0"},"verb":{"related":{"list":["find-file-up","look-up","load-pkg","load-module-pkg","module-root"]}},"gitHead":"11a92a8379d6f35653d9da2b8dbf224b653c54e3","_id":"find-pkg@0.1.0","_shasum":"32b7422fc432c74c1bb20ba60b9d64af621b57da","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":""}],"dist":{"shasum":"32b7422fc432c74c1bb20ba60b9d64af621b57da","size":2168,"noattachment":false,"key":"/find-pkg/-/find-pkg-0.1.0.tgz","tarball":"http://name.csiicloud.com:7001/find-pkg/download/find-pkg-0.1.0.tgz"},"directories":{},"publish_time":1448680141718,"_cnpm_publish_time":1448680141718,"_hasShrinkwrap":false}},"readme":"# find-pkg [![NPM version](https://img.shields.io/npm/v/find-pkg.svg?style=flat)](https://www.npmjs.com/package/find-pkg) [![NPM monthly downloads](https://img.shields.io/npm/dm/find-pkg.svg?style=flat)](https://npmjs.org/package/find-pkg) [![NPM total downloads](https://img.shields.io/npm/dt/find-pkg.svg?style=flat)](https://npmjs.org/package/find-pkg) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/find-pkg.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/find-pkg)\n\n> Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save find-pkg\n```\n\n## Usage\n\n```js\nconst findPkg = require('find-pkg');\n```\n\n**promise**\n\n```js\nfindPkg('a/b/c/some/path')\n  .then(file => console.log(file)) //=> /User/jonschlinkert/dev/a/b/package.json\n  .catch(console.error);\n```\n\n**async-await**\n\n```js\n(async function() {\n  const file = await findPkg('a/b/c/some/path');\n  console.log(file);\n  //=> '/Users/jonschlinkert/dev/a/b/package.json'\n})();\n```\n\n**callback**\n\n```js\nfindPkg('a/b/c/some/path', function(err, file) {\n  if (err) throw err;\n  console.log(file);\n  //=> '/Users/jonschlinkert/dev/a/b/package.json'\n});\n```\n\n**sync**\n\n```js\nconst file = findPkg.sync('a/b/c/some/path');\n//=> '/Users/jonschlinkert/dev/a/b/package.json'\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [find-file-up](https://www.npmjs.com/package/find-file-up): Find a file fast, by starting at the given cwd and recursing up one directory… [more](https://github.com/jonschlinkert/find-file-up) | [homepage](https://github.com/jonschlinkert/find-file-up \"Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.\")\n* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/js-cli/node-findup-sync#readme) | [homepage](https://github.com/js-cli/node-findup-sync#readme \"Find the first file matching a given pattern in the current directory or the nearest ancestor directory.\")\n* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules \"The directory used by npm for globally installed npm modules.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 28, 2018._","_attachments":{},"homepage":"https://github.com/jonschlinkert/find-pkg","bugs":{"url":"https://github.com/jonschlinkert/find-pkg/issues"},"license":"MIT"}