{"name":"read-pkg","version":"5.1.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":">=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":"1270befff80a3b56c072240e0a2e13441c2c96a6","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@5.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-NjNkqf8hlMuSxh+p8h8x8sCIfEv/MoRs/nYDmSRSAk879F9C94ADq+kHUJ4LTy5Nn0PYSmMYsy1mD4+lcXiBKg==","shasum":"62b924384c4525a1a7a96e2d456b80df142b4390","tarball":"http://registry-npm.ywwl.com/read-pkg/download/read-pkg-5.1.0.tgz","fileCount":5,"unpackedSize":5677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcv+AHCRA9TVsSAnZWagAAu2QP+QDVunaksBg76+KkPxHe\nkNsGh1HsdpYY/YWvTQPFwVoYyWsenturYNVwFIxOTUlKNhVvOvjTWa2LBXde\noukd8e9gFgQvkwDcVIoIfgSCs+HAcvxpll5CGzKUXYgc2uEPcLbOtYM4jKSk\n0yikqrsPC66zM9Qe1SEgM85FzFTtbkHyBIg/ORFSoCJGzrWN/322x/zTPu3R\nsEztVZjsrZKU5wuE/4l+mJNnqMbn/80jMB1Cy5eWbbgiGFjwwgsbprjOrQoz\n2GDATWyk8gBJAEC2Z4Jx4gWOJGfN39HdZQcaJ6TqkmXIR8pQFhrLxlMk5JLy\naMQwb/QeQEoNxzTNeGo3hPhWchR0K4ZGnRVz5tI1WpYN5/WaMHAP96P3vlpT\ngUbJ3+dX4KCULYvwNG5Ru035NkTsIfuL9H057GvXwLWEkGorOvJ+elOtNhqe\n/OerZ8JGgBY3+9/L0hbRl4aLkvgKNciFU55XyR5Bjv1RXr4fvqCsWSuqp1qI\n2f3JpPC71Dkh0nqoxARDu6fBT1j3dpADxSdE5Xp98a1KeNHXql8phRt3MRmg\nt4x7a/KHaSXu/6gFSSmLfweWMRinm51x91qwSVvsVrnm32Qittkzzh8yeDrH\nUAal0CMdis/u5O6Oi7yAAkLjtbEtN8HCqF0fPo8tBrbxsfSbcbMKss/ZlZzr\n29p0\r\n=PmoE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9yC1igf5iVVPlqRSpx6iD6uQvOM+lXilQBCzWEfiztgIga6PcEU/OX7zoWrs2h4U8iuRkjoOlRnXKWN4jNshfCT0="}],"size":2343,"noattachment":false,"key":"/read-pkg/-/read-pkg-5.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-pkg_5.1.0_1556078599020_0.9195486751037258"},"_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":1556078599376,"_cnpm_publish_time":1556078599376,"dist-tags":{"latest":"10.1.0"}}