{"name":"read-pkg","version":"5.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":">=8"},"scripts":{"test":"xo && ava"},"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dependencies":{"normalize-package-data":"^2.3.2","parse-json":"^4.0.0"},"devDependencies":{"ava":"^1.3.1","xo":"^0.24.0"},"xo":{"ignores":["test/test.js"]},"gitHead":"51a942906b0556cdcf83508fbf5f100dce0c4cea","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@5.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-OWufaRc67oJjcgrxckW/qO9q22iYzyiONh8h+GMcnOvSHAmhV1Dr3x+gyRjP+Qxc5jKupkSfoCQLS/98rDPh9A==","shasum":"75449907ece8dfb89cbc76adcba2665316e32b94","tarball":"http://registry-npm.ywwl.com/read-pkg/download/read-pkg-5.0.0.tgz","fileCount":4,"unpackedSize":4131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchPb0CRA9TVsSAnZWagAAVQYQAKBda4E14lgn8Uz9tkq9\nqghvRVNyDJUYMvCWeh3z6uY20tFw3GdgYyEZKH3RAidF+y6SU77UpF8EMPD8\n0tAoP83yOeyicrmPYX0ga4fPqOEDIZpCUQ8owxhxWrKwft9P5EwMEm/50eFc\n5ykWOz9IEfjoKVr12PiP8pP/sSS7K9wYGvMb/iQsQrFX4aL59cl4ZQ9WV2z6\nNHQljhg7NcGXowr8p5a/T+e4v0qYa4aKyLutSaJuWIq8OMdeXZ+FJI6Mu7sh\n2/6QGXsJcLc5aihM2YwaX86SRLxvEXIkKVYZ5v18nbdRdACmeFX37qHz0cZ8\nhDUFPj1UtZLkgWjZgABSpTISjuPGPq/yRsNU+FE/mftEne/oVbtTU752u+wF\ntOCmEhZTlcZm8fTUf35eDnXQvaHCL/mr0Ka0v5tu7GQIM9nEks3DyJlV1ytT\nPhScJoVq2gxhcaLIF+YefP/y3nyImxxbdC0O9E7rheT3C9PhbtgWjy8j9PMp\n5YoY8SrZqj6BqLrmK6U67VTogeSWe1+R5Enq5q3PXwBUxE34+J9VL0Cn95HJ\n0FW/Xi/9Z3a/YkZU1Vb6fxrHK4ocIRFfKsXIjPUZhNiRGsYoTEVzP/aPVw1B\nMYRQOe/8Q/9UxXiIGzWkssSxUtf1HHjX7Wr0AWRh1499zAzXM2uSXkf7uk7t\nKLIr\r\n=IttD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZNReHbkZQt4B6TGWvp8c3IfJdVUD3t2SFEkZP1PKCpAiEAs8bGNrtq9cwzM0oboKctc4lJCluAOgX4vVAcn/9o25o="}],"size":1956,"noattachment":false,"key":"/read-pkg/-/read-pkg-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-pkg_5.0.0_1552217844129_0.23799943554602554"},"_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":1552217844281,"_cnpm_publish_time":1552217844281,"dist-tags":{"latest":"10.1.0"}}