{"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":"github@sellside.com"}],"dist":{"shasum":"96db242e001c7c55025d32213302ea3aba677177","tarball":"http://registry-npm.ywwl.com/find-pkg/download/find-pkg-1.0.0.tgz","integrity":"sha512-mz/zt+x9A/DPzP9zuOQhpe5C9jjH0vpFphUv1itUHmCuiObPF+C8Ngk9j36EhmUB/p8Y9jgjKndA9wy3eE9JkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPh9iG/AndpPqlBwBJ+gbRXKAqtFu8WdtsmeVJ0bX40wIgdw0Kcg9KWpmV1pGjBPQ2hG+QyJGt4XmVHNzvFEN5Ajk="}],"size":2649,"noattachment":false,"key":"/find-pkg/-/find-pkg-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-pkg-1.0.0.tgz_1495254203346_0.5638200419489294"},"directories":{},"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._","publish_time":1495254204376,"_cnpm_publish_time":1495254204376,"dist-tags":{"latest":"2.0.0"}}