{"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://registry-npm.ywwl.com/read-pkg/download/read-pkg-2.0.0.tgz","integrity":"sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAk66fJHy3akH3BQBAtUR5BEfSxMAXqBxmto9afGPmtxAiEAzH9FnrvlQ+miIqu6pbCjv88SbVMtPdiQfHNasAfrc/w="}],"size":2062,"noattachment":false,"key":"/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":{},"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":1475052271441,"_cnpm_publish_time":1475052271441,"dist-tags":{"latest":"10.1.0"}}