validate-npm-package-name
npmv8.0.0Give me a string and I'll tell you if it's a valid npm package name
Safe to adopt
Yes — validate-npm-package-name scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 124 days ago. 7 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 124 days ago. 7 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 9.0 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 4 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
ISC — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding validate-npm-package-name to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^22.22.2 || ^24.15.0 || >=26.0.0
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the validate-npm-package-name README.
const validate = require("validate-npm-package-name")
validate("some-package")
validate("example.com")
validate("under_score")
validate("123numeric")
validate("@npm/thingy")
validate("@jane/foo.js")validate-npm-package-name vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| validate-npm-package-namethis page | 0 | 1 | ISC | 4 months ago |
| pkg-dirdeprecated | 0 | 1 | MIT | 1 day ago |
| zod | 246.7M | 13 | MIT | 1 day ago |
| @standard-schema/spec | 99.1M | 9 | MIT | 1 day ago |
| valibot | 16.8M | 5 | MIT | 1 day ago |
| @eslint/object-schema | 0 | 1 | Apache-2.0 | 1 day ago |
Dependencies
Declared by validate-npm-package-name v8.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on validate-npm-package-name.
Relationship graph
Dependencies (left) and dependents (right) of validate-npm-package-name.
Frequently installed together
Release history
6 releases in the last two years, typically about 68 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 8.0.0latest | 4 months ago | 9.0 KB | ISC |
| 7.0.2 | 8 months ago | 9.0 KB | ISC |
| 7.0.1 | 8 months ago | 8.0 KB | ISC |
| 7.0.0 | 10 months ago | 7.7 KB | ISC |
| 6.0.2 | 1 year ago | 7.7 KB | ISC |
| 6.0.1 | 1 year ago | 7.7 KB | ISC |
| 6.0.0 | 1 year ago | 7.6 KB | ISC |
| 5.0.1 | 2 years ago | 7.6 KB | ISC |
| 5.0.0 | 3 years ago | 7.7 KB | ISC |
| 4.0.0 | 4 years ago | 7.7 KB | ISC |
| 3.0.0 | 9 years ago | — | ISC |
| 2.2.2 | 11 years ago | — | ISC |
| 2.2.1 | 11 years ago | — | ISC |
| 2.2.0 | 11 years ago | — | ISC |
| 2.1.0 | 11 years ago | — | ISC |
Overview
validate-npm-package-name is an npm package that give me a string and I'll tell you if it's a valid npm package name. It has 1 known dependents in the graph. The latest version is 8.0.0, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need give me a string and I'll tell you if it's a valid npm package name and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (ISC).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Keywords
Frequently asked questions
Should I use validate-npm-package-name?
Yes — validate-npm-package-name scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 124 days ago. 7 releases in the last 2 years.
How do I install validate-npm-package-name?
Run `npm install validate-npm-package-name` to add validate-npm-package-name to your npm project.
What license is validate-npm-package-name released under?
validate-npm-package-name is distributed under the ISC license.
How popular is validate-npm-package-name?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on validate-npm-package-name.
Is validate-npm-package-name still maintained?
The most recent release of validate-npm-package-name (v8.0.0) was published 4 months ago.
Does validate-npm-package-name run install scripts?
No. validate-npm-package-name does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.