{"name":"load-pkg","description":"Loads package.json, by finding the first directory with a package.json, recursing up, starting with the given directory.","version":"4.0.0","homepage":"https://github.com/jonschlinkert/load-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/load-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/load-pkg/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=8"},"scripts":{"test":"mocha"},"dependencies":{"find-pkg":"^2.0.0"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^5.2.0"},"keywords":["config","dir","directory","file","find","find-up","findup","findup-sync","folder","json","load","look","look-up","match","package","package-json","parent","parents","parse","path","pkg","read","resolve","search","up","walk","walking"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["cwd","find-pkg","look-up"]},"lint":{"reflinks":true}},"gitHead":"c331b17ce23324f0abc65b073215f25564a369db","_id":"load-pkg@4.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-xS6uYdbUzHbwO5bExhtM8RsU6Z/fVEfZE4uZpWQOwVygLSUfXz7J97nGzJfZ+FFCZc0Weabn/wA3y1k9Q7Y4mw==","shasum":"f80a29aec2f6d02aadde714099fda4eea1b611f1","tarball":"http://registry-npm.ywwl.com/load-pkg/download/load-pkg-4.0.0.tgz","fileCount":4,"unpackedSize":8493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMyrvCRA9TVsSAnZWagAAgmUP/2RVnzpuorcK7Plwn0A9\nJeMJ2AOSb7U1IZVtbmyxA0ezTBPDPsFIBzUyqqzWrXMJTkQnxFbKAHy61/q0\n0QnPKk/MznlUE1jbrf5My2xQmQMDTSqu5CNdAFIClyp1XfPOgIHm72nRidtL\nd1nfmQFGFo2OloMYBGp0TNqfFy09YOFesnNg6SfSm/I0p4Zyj+IKsbQS1PVo\ng96tWst2oCOdQoUIxBchBhcl7ahPpRIyQpHwy/98WIJyUx6vKExvdzfBMw4r\nh/Dx8ps/itNvJU3L+XXmSjSPcLiGOToQMP0tydXuO+pcLMIxmvUmSenqUFLT\nfH6SyF4tfls1eA8yysKyuwZlyIBhHE4jGf8oLxNKwus7H4G/G4j9PoyapEpM\nVZp20hdD1ZDkorWfPBFHMe8HxFCUpKT6JPVhINmB+yRStAWNJZ2dLf+LgLtB\nAmzycX/J59NCRv96dwbz2gGJltQjV5eXBGMIVnuOka3MJ9KSnbVFaNFePrzL\nKPikzxsqm/WBQfTL91BKvLZieyQT6jZNmofNgXSi8cIvuzjiiulFmLmLTtiv\nL7m6ZL+EFNem1HhXDIPpeNMT9ywdoGk8vuNYir50idgzidy1STeIkunyxjkz\nhmrTPf4SpVAKhAbUOCtPJDBFLQQbx7hsNY9PD7dcdXOTt4B85ckt8NBO2ESb\nHZwk\r\n=CEoL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwl8o4F5PEjGIggdBxyYb4Bf+iEZMzHibYfrOTnaIbjAIgAnWSrNcsRxi1fMsuil/fPA31VW+YYZCNDcII3TT6cc8="}],"size":3235,"noattachment":false,"key":"/load-pkg/-/load-pkg-4.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-pkg_4.0.0_1530079983640_0.6086636434699118"},"_hasShrinkwrap":false,"readme":"# load-pkg [![NPM version](https://img.shields.io/npm/v/load-pkg.svg?style=flat)](https://www.npmjs.com/package/load-pkg) [![NPM monthly downloads](https://img.shields.io/npm/dm/load-pkg.svg?style=flat)](https://npmjs.org/package/load-pkg) [![NPM total downloads](https://img.shields.io/npm/dt/load-pkg.svg?style=flat)](https://npmjs.org/package/load-pkg) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/load-pkg.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/load-pkg)\n\n> Loads package.json, by finding the first directory with a package.json, recursing up, starting with the given directory.\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 load-pkg\n```\n\n## Usage\n\n### async\n\nBy default, if no callback is passed a promise is returned.\n\nThe following examples assume the code is inside an `async` function:\n\n```js\nconst load = require('load-pkg');\n\n// get the package.json from the cwd\nconst pkg = await load();\n\n// specify the starting directory to search from\nconst pkg = await load('foo/bar');\n```\n\n### async callback\n\n```js\nconst load = require('load-pkg');\n\n// get the package.json from the cwd\nload((err, pkg) => {\n  console.log(pkg); \n});\n\n// specify the starting directory to search from\nload('foo/bar', (err, pkg) => {\n  console.log(pkg); \n});\n```\n\n### sync\n\nLoads the package.json in `process.cwd()` by default:\n\n```js\nconst load = require('load-pkg');\n\n// the following are equivalent\nconst pkg = load.sync(process.cwd());\nconst pkg = load.sync();\n```\n\nSpecify a cwd or filepath to start from:\n\n```js\nconst pkg = require('load-pkg').sync('a/b/c');\n```\n\n## Release history\n\n### v3.0.0\n\n* The main export now returns a promise if no callback is passed. There should not be any breaking changes.\n\n### v2.0.0\n\n**Breaking changes**\n\n* The main export is now a function that must be called.\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* [cwd](https://www.npmjs.com/package/cwd): Easily get the CWD (current working directory) of a project based on package.json, optionally starting… [more](https://github.com/jonschlinkert/cwd) | [homepage](https://github.com/jonschlinkert/cwd \"Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (node.js/javascript util)\")\n* [find-pkg](https://www.npmjs.com/package/find-pkg): Find the first directory with a package.json, recursing up, starting with the given directory. Similar… [more](https://github.com/jonschlinkert/find-pkg) | [homepage](https://github.com/jonschlinkert/find-pkg \"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* [look-up](https://www.npmjs.com/package/look-up): Faster drop-in replacement for find-up and findup-sync. | [homepage](https://github.com/jonschlinkert/look-up \"Faster drop-in replacement for find-up and findup-sync.\")\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 June 27, 2018._","publish_time":1530079983746,"_cnpm_publish_time":1530079983746,"dist-tags":{"latest":"4.0.0"}}