{"name":"packument","version":"1.0.0","description":"Fetch package metadata from the npm registry","license":"MIT","author":{"name":"Vincent Weevers"},"scripts":{"test":"standard && node test"},"dependencies":{"registry-auth-token":"~3.3.2","registry-url":"~3.1.0","simple-get":"~3.0.2"},"devDependencies":{"nock":"~9.2.5","standard":"~11.0.1","tape":"~4.9.0"},"keywords":["npm","package","packument","registry"],"engines":{"node":">=6"},"repository":{"type":"git","url":"git+https://github.com/vweevers/packument.git"},"bugs":{"url":"https://github.com/vweevers/packument/issues"},"homepage":"https://github.com/vweevers/packument","gitHead":"50396ada141de40bf4afc042ef82ac8c1406e097","_id":"packument@1.0.0","_shasum":"63a7502c456d675bd31a65307fdf5f74e49a1141","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.8.0","_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"}],"dist":{"shasum":"63a7502c456d675bd31a65307fdf5f74e49a1141","tarball":"http://registry-npm.ywwl.com/packument/download/packument-1.0.0.tgz","fileCount":8,"unpackedSize":9619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5IC+CRA9TVsSAnZWagAAyUoP/0iskH/UaMupOLlseJ+s\ndAGagfHuZVZ4LHm3k+rP7n8QsvVykYvwe7dpbjk6XG1uPeq1hHYLpoTDyFqL\nhWwvjRwnGoKxb69Q2kjJWU8dF5BbACnfDWgo279qYq+KVj3J+rVvGgllrPgs\n+1Hj3Evyz7Hv7QPb+VJp7RKeTfXECIz+tCximf0QjvFqOYmkJNQ8CN9/s5dn\nUBkaM/lzSN13ipHi3qUL/pGNMVdMCqu26hrAH1mDdlf2eWkJq1q/D0HtNAET\nz4CE0wWoo4skCLOOhLqJLIdLzf729di2aQbvtMG7d81Qv4Jbvxs+AfMd7nQC\ngE39lOZxSOEdc2qE35kFkyVYw6V6jJcokCQiyITCKs8ZIix5b1um/iQi4h2+\ncXNkQCY0EoqRfVwNWCwCnq3kiHtgAaMmn0S4r3yt0OIK6j6+kjmjN2OshX6a\nwXIq4/de7d8wgcYVmhZ+nW2w8mM0f1+LrGM7QPs/FUVLqC4Z3n1i3eqGw+wS\n/zskiM30tBfFm0GZDWaRKo1aHw+Drwrn50z+TETtyk+YAaWLQeoFlsrS+5eB\n65KoVKcx8fOM59fJIiCjJhlt7NsyK9nOMC+c/wkpTzkz+a60QFXdHL+trMZR\n/7FSESKkGaunSQ6/Pwm5Anmnx6IxMHf2tdimTk14sYphfDfdI1cDPGjO3NoX\nqSv+\r\n=wZmu\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-QZcuvlhaTM36/60H/iI+oMHDXzmCv85IjoM3modV3d0dnVvdhkpI/Sheyussi0wVlPMoNNd4CDbLha/J+jOqbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhj3gJLPvuvVEq4iY5UvmBcYtVZXw9SKfosyUHRZO6BQIgIs+ffiEtKGQTi6EWj8YyxzMkhB2++zNREQQm3aXv/E4="}],"size":3586,"noattachment":false,"key":"/packument/-/packument-1.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packument_1.0.0_1524924605757_0.5514917411458826"},"_hasShrinkwrap":false,"readme":"# packument\n\n**Fetch package metadata from the npm registry. Supports scopes and private registries. If you only need the metadata of a specific version, use [`packument-package`](https://www.npmjs.org/package/packument-package).**\n\n[![npm](https://img.shields.io/npm/v/packument.svg)](https://www.npmjs.com/package/packument)\n[![node](https://img.shields.io/node/v/packument.svg)](https://www.npmjs.com/package/packument)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/packument/Test?label=test)](https://github.com/vweevers/packument/actions/workflows/test.yml)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript&logoColor=fff)](https://standardjs.com)\n\n## example\n\n```js\nconst packument = require('packument')\n\npackument('levelup', (err, result) => {\n  if (err) throw err\n  console.log(result.versions['2.0.2'].dependencies)\n})\n```\n\n## `packument(name[, opts], callback)`\n\nCallback receives an error if any, a packument and response headers. Options:\n\n- `headers`: custom headers (you can override any)\n- `keepAlive`: shortcut for `headers: { connection: 'keep-alive' }`\n- `full`: if true, fetch full metadata rather than an [abbreviated document](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md).\n\n## `packument = packument.factory(opts)`\n\nPreconfigure the function. For example, to always fetch full metadata:\n\n```js\nconst packument = require('packument').factory({ full: true })\n\npackument('levelup', (err, result) => {\n  if (err) throw err\n  console.log(result._rev)\n})\n```\n\nCombine it with an in-memory cache:\n\n```js\nconst memoize = require('thunky-with-args')\nconst packument = memoize(require('packument').factory({ full: true }))\n\npackument('levelup', (err, result) => {\n  // It will make only one request\n})\n\npackument('levelup', (err, result) => {\n  // Subsequent calls for the same package are cached\n})\n```\n\nReuse that cache in other modules:\n\n```js\nconst memoize = require('thunky-with-args')\nconst packument = memoize(require('packument'))\nconst getPackage = require('packument-package').factory(packument)\n\ngetPackage('levelup', '~2.0.0', function (err, pkg) {\n  if (err) throw err\n  console.log(pkg.version)\n})\n```\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install packument\n```\n\n## license\n\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers\n","publish_time":1524924605843,"_cnpm_publish_time":1524924605843,"dist-tags":{"latest":"2.0.0"}}