npm.io
1.1.10 • Published 2 weeks ago

env-path-key

Licence
MIT
Version
1.1.10
Deps
0
Size
12 kB
Vulns
0
Weekly
0

env-path-key

Find the environment variable name used for PATH on the current platform.

Install

npm install env-path-key

Use

const envPathKey = require('env-path-key');

console.log(envPathKey()); // 'PATH' on POSIX, usually 'Path' on Windows

Pass platform and env when inspecting another environment without changing the process environment:

envPathKey({ platform: 'win32', env: { pAtH: 'value' } }); // 'pAtH'

Keywords