{"name":"load-pkg","description":"Loads the package.json from the root of the user's current project.","version":"2.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":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"cwd":"^0.8.3"},"devDependencies":{"mocha":"*"},"keywords":["config","json","load","package","package-json","pkg"],"verb":{"related":{"list":["list-deps","resolve-dep","look-up","load-plugins"]}},"gitHead":"a9ed595d6c742effe2b2cb0e5a7f3e3445b91b1b","_id":"load-pkg@2.0.0","_shasum":"725c00da40dd69963255bb0a0534a1c051c3a2a2","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"725c00da40dd69963255bb0a0534a1c051c3a2a2","tarball":"http://registry-npm.ywwl.com/load-pkg/download/load-pkg-2.0.0.tgz","integrity":"sha512-X88A6dJqjzTEYtpamvv4N8ZS4wDtPhwe9L+XJS4ytMr69wphs0yIfsVx9gZHu/7AIAwJWo3CmpH9IImK7ipvag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWKSu3rxViqT7pGdicWrP0Odhtw/iG8OLSV+ndFY0NTQIhANfi/dZKvREx6SSTkkawOf+WdvGmUDFr64G0Q5vuKfGG"}],"size":2213,"noattachment":false,"key":"/load-pkg/-/load-pkg-2.0.0.tgz"},"directories":{},"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":1445315358223,"_cnpm_publish_time":1445315358223,"dist-tags":{"latest":"4.0.0"}}