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 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'
39 Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
41 Use a custom environment variables object.
46 Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
48 Get the PATH key for a specific platform.
55 <a href="https://tidelift.com/subscription/pkg/npm-path-key?utm_source=npm-path-key&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
59 Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.