{"name":"load-pkg","description":"Load the package.json in the base of the user's current project.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/load-pkg","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/load-pkg.git"},"bugs":{"url":"https://github.com/jonschlinkert/load-pkg/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/load-pkg/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"dependencies":{"cwd":"^0.4.0"},"keywords":["package","load","pkg","config","package.json"],"_id":"load-pkg@0.2.0","_shasum":"3b4280f8d6a01c522a3f65acdf6527f68e9335f6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3b4280f8d6a01c522a3f65acdf6527f68e9335f6","tarball":"http://registry-npm.ywwl.com/load-pkg/download/load-pkg-0.2.0.tgz","integrity":"sha512-xAHi9tiLX8Ca437YSz9SSkVSbFDL0VOlM4KtsIKCEjpYBEaEyGsUaILsbuOJ+wyREe/LgMRsE6qKrciI90twLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnXmKBuEJ0K7+zsSyy0weHG1pHkQUPmaWRv5dLHUR9WAIgK+Ij/PYs67C5QkWNxO9bwZBX7BKUVcgMXHolBgoBc24="}],"size":2375,"noattachment":false,"key":"/load-pkg/-/load-pkg-0.2.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":1417428949599,"_cnpm_publish_time":1417428949599,"dist-tags":{"latest":"4.0.0"}}