{"name":"read-pkg","version":"5.1.1","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":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["json","read","parse","file","fs","graceful","load","package","normalize"],"dependencies":{"@types/normalize-package-data":"^2.4.0","normalize-package-data":"^2.5.0","parse-json":"^4.0.0","type-fest":"^0.4.1"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"xo":{"ignores":["test/test.js"]},"gitHead":"7a86b115b300fb4f4fae392376bb2a389910bc45","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@5.1.1","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-dFcTLQi6BZ+aFUaICg7er+/usEoqFdQxiEBsEMNGoipenihtxxtdrQuBXvyANCEI8VuUIVYFgeHGx9sLLvim4w==","shasum":"5cf234dde7a405c90c88a519ab73c467e9cb83f5","tarball":"http://registry-npm.ywwl.com/read-pkg/download/read-pkg-5.1.1.tgz","fileCount":5,"unpackedSize":5678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxC6wCRA9TVsSAnZWagAAceMP/RXX0DGAp9ohCVRyc6QK\nftLjJ0qvde2OKBfmoqoQls3HtsqfmsZOUdce6sbLEchhEUUFuS9APrr6AgBx\njhVf2e0mZqlzKB95Zn9I0tN0PB7oVILorJRYeAjrqiZI3ARL52Z5yEYlFlR0\nxif96h1BV1Q0qI46w8ftaqbn8mb3tnrAUV5S/EAreBiOzyiKhKf11J4LVSN1\nZAr5lRVxG5S1ySjUYqQBb5k2x0hnmlYA7hesTlWdiarI73aJUQsxqb9VGKPi\nIva/g0feiINgrcqSwaun01IacNmZT+jqEiGm8csq+2gJdS90jH25V/QSpGLN\nYz4iwsiKSHA49oXvMGgeuPT3lsq39teR/39EgmbBCN4yBVkTirWjFJdXLQZb\ngkikOjQHjDasLFT/ozAMgUuxjyIK5HrQQ+IBPC4FgivjGHcbwAa6QUQDuzes\nByrB92ovfBLn7nee401ZRdjWzN+isC71H+MSH265QUS/aRB4r7eKqIrWj9D4\n3Vj9XaKh1nEiR0q6Bt80trTUnzJ1+9AJxIVU5fk5mjm8PnQ5o3HLgRZZnac0\nBXS6B6caSjh9lg8BtZfTtjAEblirdF6xMs3kwM1WEEKhOxmwGZb352ukI8GH\nysejugehc9ed8Z2Qg8vW3cArC6JxDYQaH+3jDo0fuBjrEMViWUQINrMnDoyp\nx8su\r\n=iKmJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEVCeAUZgZMhJkB/8RAMqWBsJzy3m2X97qMhVRLxf4FAiAWK+prRB2BLOtxwj1TAMZoPjre/K/O7CWpwFce1cSj/A=="}],"size":2343,"noattachment":false,"key":"/read-pkg/-/read-pkg-5.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-pkg_5.1.1_1556360879551_0.3519375135267959"},"_hasShrinkwrap":false,"readme":"# read-pkg\n\n> Read a package.json file\n\n## Why\n\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## Install\n\n```sh\nnpm install read-pkg\n```\n\n## Usage\n\n```js\nimport {readPackage} from 'read-pkg';\n\nconsole.log(await readPackage());\n//=> {name: 'read-pkg', …}\n\nconsole.log(await readPackage({cwd: 'some-other-directory'}));\n//=> {name: 'unicorn', …}\n```\n\n## API\n\n### readPackage(options?)\n\nReturns a `Promise<object>` with the parsed JSON.\n\n### readPackageSync(options?)\n\nReturns the parsed JSON.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `URL | string`\\\nDefault: `process.cwd()`\n\nCurrent working directory.\n\n##### normalize\n\nType: `boolean`\\\nDefault: `true`\n\n[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.\n\n### parsePackage(packageFile, options?)\n\nParses an object or string into JSON.\n\n#### packageFile\n\nType: `object | string`\n\nAn object or a stringified object to be parsed as a package.json.\n\n#### options\n\nType: `object`\n\n##### normalize\n\nType: `boolean`\\\nDefault: `true`\n\n[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.\n\n## Related\n\n- [read-package-up](https://github.com/sindresorhus/read-package-up) - Read the closest package.json file\n- [write-package](https://github.com/sindresorhus/write-package) - Write a `package.json` file\n- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file\n","publish_time":1556360879808,"_cnpm_publish_time":1556360879808,"dist-tags":{"latest":"10.1.0"}}