Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 26, 2024 via pnpm

path-key 3.1.1

Get the PATH environment variable key cross-platform
Package summary
Share
0
issues
1
license
1
MIT
Package created
28 Dec 2015
Version published
22 Nov 2019
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
path-key@3.1.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of path-key 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does path-key do?

Path-key is a handy JavaScript package that allows you to get the PATH environment variable key in a cross-platform manner. This can be particularly useful because the casing of the PATH variable can differ depending on the operating system. For example, it's usually PATH but on Windows, it can be any casing like Path.

How do you use path-key?

The usage of path-key is straightforward. To utilize path-key in your JavaScript project, first, you must install it using npm, as follows:

$ npm install path-key

After installation, you can import and use path-key into your JavaScript file as follows:

import pathKey from 'path-key';

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

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

The pathKey() function returns the PATH key tailored to the platform your script is currently running on. You can also pass a custom environment variables object or specify a platform to get the PATH key for a specific platform.

Where are the path-key docs?

Regarding the path-key documentation, it's primarily found in the README.md file in the project's GitHub repository https://github.com/sindresorhus/path-key. This readme document provides an overview of the package, installation instructions, usage examples, and relevant API reference. Thus, it serves as the main documentation for path-key package.