{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dist-tags":{"latest":"2.0.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Read a package.json file","readme":"# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg)\n\n> Read a package.json file\n\n\n## Why\n\n- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)\n- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)\n- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)\n- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)\n\n\n## Install\n\n```\n$ npm install --save read-pkg\n```\n\n\n## Usage\n\n```js\nconst readPkg = require('read-pkg');\n\nreadPkg().then(pkg => {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n\nreadPkg(__dirname).then(pkg => {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n\nreadPkg(path.join('unicorn', 'package.json')).then(pkg => {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n```\n\n\n## API\n\n### readPkg([path], [options])\n\nReturns a `Promise` for the parsed JSON.\n\n### readPkg.sync([path], [options])\n\nReturns the parsed JSON.\n\n#### path\n\nType: `string`<br>\nDefault: `.`\n\nPath to a `package.json` file or its directory.\n\n#### options\n\n##### normalize\n\nType: `boolean`<br>\nDefault: `true`\n\n[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.\n\n\n## Related\n\n- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file\n- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file\n- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/read-pkg.git"},"users":{"nesterone":true,"huhgawz":true,"dr2009":true},"bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"license":"MIT","versions":{"1.0.0":{"name":"read-pkg","version":"1.0.0","description":"Read a package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/read-pkg.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dependencies":{"load-json-file":"^1.0.0","normalize-package-data":"^2.3.2"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"1ed9e57e3048285289547ea375eb7a5adabed1c4","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@1.0.0","_shasum":"6199b5a0a9596f32eb83044e89400969587542de","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6199b5a0a9596f32eb83044e89400969587542de","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/read-pkg/-/read-pkg-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.1.0":{"name":"read-pkg","version":"1.1.0","description":"Read a package.json file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/read-pkg"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dependencies":{"load-json-file":"^1.0.0","normalize-package-data":"^2.3.2","path-type":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"9448d32b2ebcd65fc0547def3cfe5b28ef522e68","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg","_id":"read-pkg@1.1.0","_shasum":"f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/read-pkg/-/read-pkg-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"2.0.0":{"name":"read-pkg","version":"2.0.0","description":"Read a package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/read-pkg.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dependencies":{"load-json-file":"^2.0.0","normalize-package-data":"^2.3.2","path-type":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"c1664a2f42d1f1898b7648534576e6dcfa1f48c8","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@2.0.0","_shasum":"8ef1c0623c6a6db0dc6713c4bfac46332b2368f8","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8ef1c0623c6a6db0dc6713c4bfac46332b2368f8","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/read-pkg/-/read-pkg-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/read-pkg-2.0.0.tgz_1475052271222_0.4820629544556141"},"directories":{}}},"name":"read-pkg","time":{"modified":"2017-07-28T06:08:19.761Z","created":"2015-09-02T08:47:51.680Z","1.0.0":"2015-09-02T08:47:51.680Z","1.1.0":"2015-09-05T09:51:50.133Z","2.0.0":"2016-09-28T08:44:31.441Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/read-pkg#readme"}