path-key
npmv4.0.0Get 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.
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 >=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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| path-keythis page | 244.9M | 1 | MIT | 5 years ago |
| env-paths | 0 | 2 | MIT | 1 day ago |
| mpath | 5.8M | 1 | MIT | 1 day ago |
| envinfo | 0 | 2 | MIT | 1 day ago |
| cross-spawn | 0 | 9 | MIT | 1 day ago |
| slash | 0 | 14 | MIT | 1 day ago |
Dependencies
Declared by path-key v4.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (4)
Used by
Popular packages that depend on path-key.
Relationship graph
Dependencies (left) and dependents (right) of path-key.
Frequently installed together
Like which(1) unix command. Find the first instance of an executable in the PATH.
An AST-based pattern checker for JavaScript.
Delightful JavaScript Testing.
Get the command from a shebang
Jest plugin to use babel for transformation.
Release history
No releases in the last two years, typically about 271 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.0.0latest | 5 years ago | 4.0 KB | MIT |
| 3.1.1 | 6 years ago | 4.4 KB | MIT |
| 3.1.0 | 7 years ago | 4.1 KB | MIT |
| 3.0.0 | 7 years ago | 3.6 KB | MIT |
| 2.0.1 | 10 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.0.0 | 10 years ago | — | MIT |
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
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.