{"name":"read-pkg","version":"1.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":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["json","read","parse","file","fs","graceful","load","pkg","package","normalize"],"dependencies":{"load-json-file":"^1.0.0","normalize-package-data":"^2.3.2"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"1ed9e57e3048285289547ea375eb7a5adabed1c4","bugs":{"url":"https://github.com/sindresorhus/read-pkg/issues"},"homepage":"https://github.com/sindresorhus/read-pkg#readme","_id":"read-pkg@1.0.0","_shasum":"6199b5a0a9596f32eb83044e89400969587542de","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6199b5a0a9596f32eb83044e89400969587542de","tarball":"http://registry-npm.ywwl.com/read-pkg/download/read-pkg-1.0.0.tgz","integrity":"sha512-3HUGRlEUtdq9ctd7RpIRrGglqLOCfIQI81LdibSUbAz+ClnmsAZI8ZJeuh59ER7dtNjrqEXDAxRe+gPcWdesOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCc8TbouQu+62tUbE3C+ThnYUvmOrUAv2pDVEVeGKsiOgIhAMNoZcrVi152odmtJTsBeQ9ExMcpUmsAc/HFdJbJMkRE"}],"size":2009,"noattachment":false,"key":"/read-pkg/-/read-pkg-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"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":1441183671680,"_cnpm_publish_time":1441183671680,"dist-tags":{"latest":"10.1.0"}}