{ "name": "package-json", "version": "1.2.0", "description": "Get the package.json of a package from the npm registry", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/package-json.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "mocha" }, "files": [ "index.js" ], "keywords": [ "npm", "registry", "package", "pkg", "package.json", "json", "module", "scope", "scoped" ], "dependencies": { "got": "^3.2.0", "registry-url": "^3.0.0" }, "devDependencies": { "mocha": "*" }, "readme": "# package-json [![Build Status](https://travis-ci.org/sindresorhus/package-json.svg?branch=master)](https://travis-ci.org/sindresorhus/package-json)\n\n> Get the package.json of a package from the npm registry\n\n\n## Install\n\n```\n$ npm install --save package-json\n```\n\n\n## Usage\n\n```js\nvar packageJson = require('package-json');\n\npackageJson('pageres', 'latest', function (err, json) {\n\tconsole.log(json);\n\t//=> { name: 'pageres', ... }\n});\n\n// also works with scoped packages\npackageJson('@company/package', 'latest', function (err, json) {\n\tconsole.log(json);\n\t//=> { name: 'package', ... }\n});\n\npackageJson.field('pageres', 'description', function (err, field) {\n\tconsole.log(field);\n\t//=> 'Capture website screenshots'\n});\n```\n\n\n## API\n\n### packageJson(name, [version], callback)\n\nYou can optionally specify a version (e.g. `0.1.0`) or `latest`. \nIf you don't specify a version you'll get the [main entry](http://registry.npmjs.org/pageres/) containing all versions.\n\n### packageJson.field(name, field, callback)\n\nGet a specific field in the `package.json`.\n\n\n## Related\n\n- [npm-keyword](https://github.com/sindresorhus/npm-keyword) - Get a list of npm packages with a certain keyword\n- [npm-user](https://github.com/sindresorhus/npm-user) - Get user info of a npm user\n- [npm-email](https://github.com/sindresorhus/npm-email) - Get the email of a npm user\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/sindresorhus/package-json/issues" }, "homepage": "https://github.com/sindresorhus/package-json#readme", "_id": "package-json@1.2.0", "_shasum": "c8ecac094227cdf76a316874ed05e27cc939a0e0", "_resolved": "https://registry.npmjs.org/package-json/-/package-json-1.2.0.tgz", "_from": "package-json@>=1.0.0 <2.0.0" }