{"_id":"packument","_rev":"4-3c6eaa6c692a3abcb1832cf561c371e6","name":"packument","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"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":"https://registry.npmjs.org/packument/-/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="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packument_1.0.0_1524924605757_0.5514917411458826"},"_hasShrinkwrap":false},"2.0.0":{"name":"packument","version":"2.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":"^4.2.1","registry-url":"^5.1.0","simple-get":"^4.0.1"},"devDependencies":{"nock":"^13.2.2","standard":"^16.0.4","tape":"^5.5.0"},"keywords":["npm","package","packument","registry"],"engines":{"node":">=10"},"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":"11190c4fe96e6c924f1e20ae656d369aae7b59e7","_id":"packument@2.0.0","_nodeVersion":"16.9.1","_npmVersion":"7.21.1","dist":{"integrity":"sha512-sTJ8gktDrIh0afD1y4SfILeEe0zp+W8N6aFFfWQCGacny2L7d5vt//+mIyWSmlHpizLvkMuDpjeN1Z37O2G1AQ==","shasum":"ceb9cbce9a6a61e02fdfaffe42ccb2c44476d6d6","tarball":"https://registry.npmjs.org/packument/-/packument-2.0.0.tgz","fileCount":4,"unpackedSize":5906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9RqFCRA9TVsSAnZWagAAPbkP/RKdLvrVMhm4DNb7hxg5\npaqEbasn0cz6fkALrux8/QUL1DgsJTwLOHEG+94oYS2ByAfLXIaMx9A78eim\n3wBpFjp8xm7SR/s4EWAnoFr0Wxj/Ay1wSZzyFL7S8p3L11XYBjUxcroEKUKg\nLbsL8Kv6pIWwTOTbLnIkZ+1HAWmAsk7FX30hd/ba8VveI2zV7Kq8V88HgC6N\nSSVsSNOul5zdG22xcVgTz04f+B5oZTKPu1PHjMTkBDnVIRPIW9wgU29djQ9a\nhKhbUZjIrcmcFkPy6E82m9Cimy1Y1/awSqEz4TRM5+dm9KKapMySgF5Yr6X3\n7fcj+UnhWM/07sxRINSGRCQJ3O26eNRoKQW3ul7hAEoqrOEd0iEsnYhr6rLZ\nf9OPmiE4XAswCtl7jc99POM9/61fLAEN1nONVJ/5Yv+lID9fG3yRpqFQb/v1\nlfhpkI9F6PIKlBKoWEidk1JKzsenfbKqQQwiI6Cl1nC+HRxnHIgp3xFnl4Ja\nexfU2c/66Usd8vKJ0GSEvxslLvAT9MbbcoylOfRoQEgDmjUGB8gduhgk69Zw\nxS89WIKIY5lk0MJWoLiX1jjRDvyak3CKC9ZXLHpDqwYPX+cSSHQBCTcUfAJ+\ncR8ee4I/MKyFPcxiP56hEKsEiInurgAAdeSj/5BQTUCQ+I45WJT9olUw3bTh\nwf2K\r\n=/npx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN5BiPYWlRVYauqSUUM3CnoFIldub2NLl4ZsT2kaY+HgIgOof3nW73KakxvLNQZYXPPhtUdBam/DQUczR3tJ1Cebg="}]},"_npmUser":{"name":"vweevers","email":"dev@vincentweevers.nl"},"directories":{},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packument_2.0.0_1643453061602_0.16396219549872848"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-28T14:10:05.756Z","1.0.0":"2018-04-28T14:10:05.843Z","modified":"2022-06-23T07:13:08.246Z","2.0.0":"2022-01-29T10:44:21.724Z"},"maintainers":[{"name":"vweevers","email":"dev@vincentweevers.nl"}],"description":"Fetch package metadata from the npm registry","homepage":"https://github.com/vweevers/packument","keywords":["npm","package","packument","registry"],"repository":{"type":"git","url":"git+https://github.com/vweevers/packument.git"},"author":{"name":"Vincent Weevers"},"bugs":{"url":"https://github.com/vweevers/packument/issues"},"license":"MIT","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","readmeFilename":"readme.md"}