1 # path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
3 > Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
5 It's usually `PATH`, but on Windows it can be any casing like `Path`...
11 $ npm install --save path-key
18 const pathKey = require('path-key');
20 const key = pathKey();
23 const PATH = process.env[key];
24 //=> '/usr/local/bin:/usr/bin:/bin'
30 ### pathKey([options])
37 Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
39 Use a custom environment variables object.
44 Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
46 Get the PATH key for a specific platform.
51 MIT © [Sindre Sorhus](https://sindresorhus.com)