</>PackageGraphPackageGraph

validate-npm-package-name

npmv8.0.0

Give 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

9.0 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.

PackageWeekly downloadsDependentsLicenseLast release
validate-npm-package-namethis page01ISC4 months ago
pkg-dirdeprecated01MIT1 day ago
zod246.7M13MIT1 day ago
@standard-schema/spec99.1M9MIT1 day ago
valibot16.8M5MIT1 day ago
@eslint/object-schema01Apache-2.01 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)

@npmcli/eslint-config ^6.0.0@npmcli/template-oss 5.0.0

Used by

Popular packages that depend on validate-npm-package-name.

Relationship graph

Dependencies (left) and dependents (right) of validate-npm-package-name.

npm-package-argvalidate-npm-pack…
validate-npm-package-name dependencies dependents

Frequently installed together

Release history

6 releases in the last two years, typically about 68 days apart.

Recent versions of validate-npm-package-name
VersionPublishedSizeLicense
8.0.0latest4 months ago9.0 KBISC
7.0.28 months ago9.0 KBISC
7.0.18 months ago8.0 KBISC
7.0.010 months ago7.7 KBISC
6.0.21 year ago7.7 KBISC
6.0.11 year ago7.7 KBISC
6.0.01 year ago7.6 KBISC
5.0.12 years ago7.6 KBISC
5.0.03 years ago7.7 KBISC
4.0.04 years ago7.7 KBISC
3.0.09 years agoISC
2.2.211 years agoISC
2.2.111 years agoISC
2.2.011 years agoISC
2.1.011 years agoISC

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.