{"_id":"@1-/npmver","name":"@1-/npmver","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@1-/npmver","version":"0.1.0","description":"Fetch the latest version of an NPM package from the official registry\n  获取 NPM 包最新版本号","keywords":["npm","version","registry","package","fetch"],"homepage":"https://github.com/webc-site/npm/tree/main/npmver","license":"MulanPSL-2.0","author":{"name":"x-at-01@googlegroups.com"},"repository":{"type":"git","url":"git+https://github.com/webc-site/npm.git"},"type":"module","exports":{".":"./_.js","./*":"./*"},"_id":"@1-/npmver@0.1.0","bugs":{"url":"https://github.com/webc-site/npm/issues"},"_nodeVersion":"26.2.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-3w3Zi2N0S2YBMoZIDRCTjIsQVHGbKAa5QqCUbS5lV1rzvcL7Its3L813Bt+ZfJZVS6U4I9tZk10/mo1Uvpl16A==","shasum":"a42ae36b782e4494c837441caff52491fa017e55","tarball":"https://registry.npmjs.org/@1-/npmver/-/npmver-0.1.0.tgz","fileCount":3,"unpackedSize":4723,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBz4okwYaQobkBkaSCG1ZRhvubL7A8RyaSSpJAnxpnSgAiEA8W2ub7miMIrMt+94Den0LbmKN3LWdsvheCbiL/mzNvI="}]},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"directories":{},"maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/npmver_0.1.0_1783327525623_0.1986017597947427"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-06T08:45:25.387Z","0.1.0":"2026-07-06T08:45:25.735Z","modified":"2026-07-06T08:45:25.975Z"},"maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"description":"Fetch the latest version of an NPM package from the official registry\n  获取 NPM 包最新版本号","homepage":"https://github.com/webc-site/npm/tree/main/npmver","keywords":["npm","version","registry","package","fetch"],"repository":{"type":"git","url":"git+https://github.com/webc-site/npm.git"},"author":{"name":"x-at-01@googlegroups.com"},"bugs":{"url":"https://github.com/webc-site/npm/issues"},"license":"MulanPSL-2.0","readme":"[English](#en) | [中文](#zh)\n\n---\n\n<a id=\"en\"></a>\n# @1-/npmver : Fetch latest NPM package version\n\n- [@1-/npmver : Fetch latest NPM package version](#1-npmver-fetch-latest-npm-package-version)\n  - [Functionality](#functionality)\n  - [Usage demonstration](#usage-demonstration)\n  - [Design rationale](#design-rationale)\n  - [Technology stack](#technology-stack)\n  - [Code structure](#code-structure)\n  - [Historical context](#historical-context)\n  - [About](#about)\n\n## Functionality\nFetch the latest published version of any NPM package directly from the official NPM registry API.\n\n## Usage demonstration\nInstall the package:\n```bash\nnpm install @1-/npmver\n```\n\nUse in JavaScript/TypeScript:\n```javascript\nimport npmver from '@1-/npmver';\n\n// Get latest version of a package\nconst version = await npmver('lodash');\nconsole.log(version); // e.g., '4.17.21'\n\n// Handle non-existent packages\nconst unknownVersion = await npmver('non-existent-package');\nconsole.log(unknownVersion); // undefined\n```\n\n## Design rationale\nThe package implements a minimal, focused solution for retrieving package versions with proper error handling:\n\n![](https://fastly.jsdelivr.net/gh/webc-fs/-@8P/8xyBenwBaVKv_jaBZH3w.svg)\n\n## Technology stack\n- Runtime: Modern JavaScript (ES modules)\n- HTTP client: Native `fetch` API\n- Testing: Bun test framework\n\n## Code structure\n```\nsrc/\n├── _.js          # Main module exporting default async function\n```\n\ntest/\n├── _.test.js     # Test cases verifying functionality\n\n## Historical context\nThe NPM registry launched in 2010 as the central repository for JavaScript packages, enabling the rapid growth of the Node.js ecosystem. Before standardized package managers, developers manually tracked library versions across projects. This utility continues that evolution by providing direct, programmatic access to version information without requiring full package installation.\n\n## About\n\nThis library is developed by [WebC.site](https://webc.site).\n\n[WebC.site](https://webc.site): A new paradigm of web development for AI\n\n\n---\n\n<a id=\"zh\"></a>\n# @1-/npmver : 获取 NPM 包最新版本\n\n- [@1-/npmver : 获取 NPM 包最新版本](#1-npmver-获取-npm-包最新版本)\n  - [功能介绍](#功能介绍)\n  - [使用演示](#使用演示)\n  - [设计思路](#设计思路)\n  - [技术栈](#技术栈)\n  - [代码结构](#代码结构)\n  - [历史故事](#历史故事)\n  - [关于](#关于)\n\n## 功能介绍\n从官方 NPM 注册表直接获取任意 NPM 包的最新发布版本号。\n\n## 使用演示\n安装包：\n```bash\nnpm install @1-/npmver\n```\n\n在 JavaScript/TypeScript 中使用：\n```javascript\nimport npmver from '@1-/npmver';\n\n// 获取包的最新版本\nconst version = await npmver('lodash');\nconsole.log(version); // 例如 '4.17.21'\n\n// 处理不存在的包\nconst unknownVersion = await npmver('non-existent-package');\nconsole.log(unknownVersion); // undefined\n```\n\n## 设计思路\n该包实现轻量级、专注的版本获取解决方案，具备完善的错误处理机制：\n\n![](https://fastly.jsdelivr.net/gh/webc-fs/-@8P/8xyBenwBaVKv_jaBZH3w.svg)\n\n## 技术栈\n- 运行时：现代 JavaScript（ES 模块）\n- HTTP 客户端：原生 `fetch` API\n- 测试：Bun 测试框架\n\n## 代码结构\n```\nsrc/\n├── _.js          # 导出默认异步函数的主模块\n```\n\ntest/\n├── _.test.js     # 验证功能的测试用例\n\n## 历史故事\nNPM 注册表于 2010 年上线，作为 JavaScript 包的中央仓库，推动了 Node.js 生态系统的快速发展。在标准化包管理器出现之前，开发者需手动跨项目追踪库版本。此工具延续这一演进，提供无需完整安装即可程序化访问版本信息的能力。\n\n## 关于\n\n本库由 [WebC.site](https://webc.site) 开发。\n\n[WebC.site](https://webc.site) : 面向人工智能的网站开发新范式\n\n","readmeFilename":"README.md","_rev":"1-2e166cf5a30c22146bcbace96c99d951"}