{"name":"read-pkg","version":"5.2.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":"^5.0.0","type-fest":"^0.6.0"},"devDependencies":{"ava":"^2.2.0","tsd":"^0.7.2","xo":"^0.24.0"},"xo":{"ignores":["test/test.js"]},"gitHead":"bfe8eb8232af1f1a32143387f909c5140a86e96d","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@5.2.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==","shasum":"7bf295438ca5a33e56cd30e053b34ee7250c93cc","tarball":"http://registry-npm.ywwl.com/read-pkg/download/read-pkg-5.2.0.tgz","fileCount":5,"unpackedSize":6049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJvO5CRA9TVsSAnZWagAAUcwP/ApNL7AlF+9bZ2TG8K+I\n07ex60Y4URshqwr682DjV17NwIkCXMmI7/3c1gXlIBHycgTt8I5VEcZLhze6\noorW8yWxAFfsimI+qJAhUUeJpJhlJJ4I1kiMgqzX3xJH4+vGkL1H6wLXV3n6\nl6MzSvgx7YeLCf8KK1g7YS4QLldzLfZNKOxgJ7gZ9PfxyG1ykjzV3OlDhlwS\nGQlvWHQVbMDFEnmgUWOG4JcVaIwyqYOueKCYgB2WXNR58l0X3Wi7k+ekfR6j\nblmIw/odmcmtzy9dUbZF4/VtKZkyIA8hzASjS8M0qW6br4ruh6+9bL+1a2YO\nLFyrQ2J5YxXWWhFXn7sFnityHuOnwlEA67Bj8tr5RPvBnxWP9GcAXSB4NVMH\ne/bWqkli6XqRGhTTfaEZ3yC61WDdT2szwF/dPtUtch70tXGt2hX1hzpW0lpU\nlaeuIQ4FyAPEbfNNiK9P61kSYsJHORII1YtUmteAoRsHMVsRWyyucB10vxZv\n0JIvo/ksj10C7NWJqMQoYvZUTuOwbUdJnAVAvodATtpcZq/TCMmMPtqBNXBG\ntWGeIXLR5KSfy8gpg+vfA3vO8JreHLFE6zvTI0oiCvaRuAsRyf/xM4Zix2Hd\nRvb/liX2V4JT3aUDwjah63aNKkEYwsGHMwxNDWNUc/ny7vMZgJ2lN97rvElB\nWdV/\r\n=AXgN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhzzWzz6KX39RYgycDr2Woi0EUAvMPoNeb3gBwXG7U5AiEA4wN7Yq4Sncq6Y/UrwrgnFELNod/pUs7KngaykQJGwgs="}],"size":2552,"noattachment":false,"key":"/read-pkg/-/read-pkg-5.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-pkg_5.2.0_1562833848277_0.7485102825560606"},"_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":1562833848441,"_cnpm_publish_time":1562833848441,"dist-tags":{"latest":"10.1.0"}}