get-path

0.0.0 • Public • Published

get-path Flattr this!experimental

Cross-platform means of getting the PATH environment variable name, which seems to be consistent everywhere but Windows.

Usage

get-path

getPath([env], [platform])

Returns the key to use when querying process.env for its PATH, e.g.:

var getPath = require('get-path')
var pathKey = getPath()
var PATH = process.env[pathKey]

Optionally, you can pass in your own env object to use in place of process.env, and your own platform string to use in place of process.platform.

License

MIT. See LICENSE.md for details.

Package Sidebar

Install

npm i get-path

Weekly Downloads

22

Version

0.0.0

License

MIT

Last publish

Collaborators

  • hughsk