</>PackageGraphPackageGraph

path-key

npmv4.0.0

Get the PATH environment variable key cross-platform

Not recommended for new projects

No — path-key should not be adopted for new projects. Last published 1979 days ago.

  • AAdoption: grade A, Excellent.

    244.9M downloads per week and 1 known dependents.

  • FMaintenance: grade F, Failing.

    Last published 1979 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 4.0 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — 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 path-key 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.

4.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 >=12
Module format
ESM only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the path-key README.

import pathKey from 'path-key';

const key = pathKey();
//=> 'PATH'

const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'

path-key vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
path-keythis page244.9M1MIT5 years ago
env-paths02MIT1 day ago
mpath5.8M1MIT1 day ago
envinfo02MIT1 day ago
cross-spawn09MIT1 day ago
slash014MIT1 day ago

Dependencies

Declared by path-key v4.0.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (4)

@types/node ^14.14.37ava ^3.15.0tsd ^0.14.0xo ^0.38.2

Used by

Popular packages that depend on path-key.

Relationship graph

Dependencies (left) and dependents (right) of path-key.

cross-spawnpath-key
path-key dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 271 days apart.

Recent versions of path-key
VersionPublishedSizeLicense
4.0.0latest5 years ago4.0 KBMIT
3.1.16 years ago4.4 KBMIT
3.1.07 years ago4.1 KBMIT
3.0.07 years ago3.6 KBMIT
2.0.110 years agoMIT
2.0.010 years agoMIT
1.0.010 years agoMIT

Overview

path-key is an npm package that get the PATH environment variable key cross-platform. It is extremely widely used, with about 244.9M downloads per week and 1 known dependents in the graph. The latest version is 4.0.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need get the PATH environment variable key cross-platform and value a battle-tested, widely-adopted 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

  • Large, well-established user base (244.9M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use path-key?

No — path-key should not be adopted for new projects. Last published 1979 days ago.

How do I install path-key?

Run `npm install path-key` to add path-key to your npm project.

What license is path-key released under?

path-key is distributed under the MIT license.

How popular is path-key?

path-key has approximately 244,859,615 downloads per week and 1 known dependent packages.

Is path-key still maintained?

The most recent release of path-key (v4.0.0) was published 5 years ago.

Does path-key run install scripts?

No. path-key does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.