Socket
Socket
Sign inDemoInstall

path-key

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 3.0.0

index.d.ts

12

index.js
'use strict';
module.exports = opts => {
opts = opts || {};
const env = opts.env || process.env;
const platform = opts.platform || process.platform;
const pathKey = (options = {}) => {
const environment = options.env || process.env;
const platform = options.platform || process.platform;

@@ -12,3 +11,6 @@ if (platform !== 'win32') {

return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path';
return Object.keys(environment).find(key => key.toUpperCase() === 'PATH') || 'Path';
};
module.exports = pathKey;
module.exports.default = pathKey;
{
"name": "path-key",
"version": "2.0.1",
"description": "Get the PATH environment variable key cross-platform",
"license": "MIT",
"repository": "sindresorhus/path-key",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"path",
"key",
"environment",
"env",
"variable",
"var",
"get",
"cross-platform",
"windows"
],
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "path-key",
"version": "3.0.0",
"description": "Get the PATH environment variable key cross-platform",
"license": "MIT",
"repository": "sindresorhus/path-key",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd-check"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"path",
"key",
"environment",
"env",
"variable",
"var",
"get",
"cross-platform",
"windows"
],
"devDependencies": {
"@types/node": "^11.11.0",
"ava": "^1.3.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
}
}

@@ -11,3 +11,3 @@ # path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)

```
$ npm install --save path-key
$ npm install path-key
```

@@ -35,2 +35,4 @@

Type: `Object`
##### env

@@ -37,0 +39,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc