{"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":"github@sellside.com"}],"dist":{"shasum":"32b7422fc432c74c1bb20ba60b9d64af621b57da","tarball":"http://registry-npm.ywwl.com/find-pkg/download/find-pkg-0.1.0.tgz","integrity":"sha512-BuZlIYPora72XOiqR+79Fvl7zsmQbeb8XCj7/OCAfNEiYWU74gTeaRJGSMgHQ/OtfuMpdDFmxuysA7kD1ggvGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRoS/+/lbw+77rBX2yA9TpoDftpSb+5Wuu909UqEWoHwIgdkWFW60LF/bpK8nbQsO79l9o1MlMBEc2drpA8dDZP38="}],"size":2168,"noattachment":false,"key":"/find-pkg/-/find-pkg-0.1.0.tgz"},"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":1448680141718,"_cnpm_publish_time":1448680141718,"dist-tags":{"latest":"2.0.0"}}