node/tools/node_modules/eslint/node_modules/path-key
Yuta Hiroto 8c6d1a0686 tools: update ESLint to 5.2.0
PR-URL: https://github.com/nodejs/node/pull/21817
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-28 06:05:49 -07:00
..
index.js tools: update ESLint to 5.0.0 2018-06-24 12:43:54 -04:00
license tools: update ESLint to 5.0.0 2018-06-24 12:43:54 -04:00
package.json tools: update ESLint to 5.2.0 2018-07-28 06:05:49 -07:00
readme.md tools: update ESLint to 5.0.0 2018-06-24 12:43:54 -04:00

path-key Build Status

Get the PATH environment variable key cross-platform

It's usually PATH, but on Windows it can be any casing like Path...

Install

$ npm install --save path-key

Usage

const pathKey = require('path-key');

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

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

API

pathKey([options])

options

env

Type: Object
Default: process.env

Use a custom environment variables object.

platform

Type: string
Default: process.platform

Get the PATH key for a specific platform.

License

MIT © Sindre Sorhus