{"id":15065295,"url":"https://github.com/vweevers/packument-package","last_synced_at":"2026-01-18T22:33:33.683Z","repository":{"id":43454532,"uuid":"131415377","full_name":"vweevers/packument-package","owner":"vweevers","description":"Fetch package metadata of a version from the npm registry.","archived":false,"fork":false,"pushed_at":"2023-11-01T20:14:18.000Z","size":11,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T04:39:07.232Z","etag":null,"topics":["npm","npm-registry","package","packument"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vweevers.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-28T14:14:04.000Z","updated_at":"2022-01-29T10:53:52.000Z","dependencies_parsed_at":"2024-09-29T13:40:27.645Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/packument-package","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/packument-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/packument-package/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument-package/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28552785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm","npm-registry","package","packument"],"created_at":"2024-09-25T00:36:25.712Z","updated_at":"2026-01-18T22:33:33.632Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# packument-package\n\n**Fetch package metadata of a version from the npm registry. If you need metadata of all versions, use [`packument`](https://www.npmjs.org/package/packument).**\n\n[![npm](https://img.shields.io/npm/v/packument-package.svg)](https://www.npmjs.com/package/packument-package)\n[![node](https://img.shields.io/node/v/packument-package.svg)](https://www.npmjs.com/package/packument-package)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/packument-package/Test?label=test)](https://github.com/vweevers/packument-package/actions/workflows/test.yml)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\u0026logoColor=fff)](https://standardjs.com)\n\n## example\n\n```js\nconst getPackage = require('packument-package')\n\n// Defaults to latest\ngetPackage('levelup', function (err, pkg) {\n  if (err) throw err\n  console.log(pkg.version)\n})\n\ngetPackage('levelup', '~2.0.0', function (err, pkg) {\n  if (err) throw err\n  console.log(pkg.version)\n})\n```\n\n## `getPackage(name[, version || opts], callback)`\n\nCallback receives an error if any, a package object and response headers. Options:\n\n- `version`: either a dist tag (`latest`), version (`1.2.3`) or range (`~1.2.3`).\n\nOther options are passed to [`packument`](https://www.npmjs.org/package/packument).\n\n## `getPackage = getPackage.factory(packument, opts)`\n\nPreconfigure the function. Useful for setting defaults or adding a cache:\n\n```js\nconst memoize = require('thunky-with-args')\nconst packument = memoize(require('packument').factory({ keepAlive: true }))\nconst getPackage = require('packument-package').factory(packument)\n\ngetPackage('levelup', '~2.0.2', (err, pkg) =\u003e {\n  // It will make only one request\n})\n\ngetPackage('levelup', '^1.3.0', (err, pkg) =\u003e {\n  // Subsequent calls for the same package are cached\n})\n```\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install packument-package\n```\n\n## license\n\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fpackument-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fpackument-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fpackument-package/lists"}