aboutsummaryrefslogtreecommitdiff
path: root/node_modules/path-key
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2019-10-06 21:37:45 +0200
committerDimitri Staessens <[email protected]>2019-10-06 21:37:45 +0200
commit3c51c3be85bb0d1bdb87ea0d6632f1c256912f27 (patch)
treec7ccc8279b12c4f7bdbbb4270d617e48f51722e4 /node_modules/path-key
parent412c104bebc507bea9c94fd53b5bdc4b64cbfe31 (diff)
downloadwebsite-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.tar.gz
website-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.zip
build: Add some required modules for node
Diffstat (limited to 'node_modules/path-key')
-rw-r--r--node_modules/path-key/index.js13
-rw-r--r--node_modules/path-key/license21
-rw-r--r--node_modules/path-key/package.json75
-rw-r--r--node_modules/path-key/readme.md51
4 files changed, 160 insertions, 0 deletions
diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js
new file mode 100644
index 0000000..62c8250
--- /dev/null
+++ b/node_modules/path-key/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = opts => {
+ opts = opts || {};
+
+ const env = opts.env || process.env;
+ const platform = opts.platform || process.platform;
+
+ if (platform !== 'win32') {
+ return 'PATH';
+ }
+
+ return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path';
+};
diff --git a/node_modules/path-key/license b/node_modules/path-key/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/path-key/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/path-key/package.json b/node_modules/path-key/package.json
new file mode 100644
index 0000000..7bee704
--- /dev/null
+++ b/node_modules/path-key/package.json
@@ -0,0 +1,75 @@
+{
+ "_args": [
+ [
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "[email protected]",
+ "_id": "[email protected]",
+ "_inBundle": false,
+ "_integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "_location": "/path-key",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "[email protected]",
+ "name": "path-key",
+ "escapedName": "path-key",
+ "rawSpec": "2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "2.0.1"
+ },
+ "_requiredBy": [
+ "/npm-run-path"
+ ],
+ "_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "_spec": "2.0.1",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "[email protected]",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/path-key/issues"
+ },
+ "description": "Get the PATH environment variable key cross-platform",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/path-key#readme",
+ "keywords": [
+ "path",
+ "key",
+ "environment",
+ "env",
+ "variable",
+ "var",
+ "get",
+ "cross-platform",
+ "windows"
+ ],
+ "license": "MIT",
+ "name": "path-key",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/path-key.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.0.1",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md
new file mode 100644
index 0000000..cb5710a
--- /dev/null
+++ b/node_modules/path-key/readme.md
@@ -0,0 +1,51 @@
+# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
+
+> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
+
+It's usually `PATH`, but on Windows it can be any casing like `Path`...
+
+
+## Install
+
+```
+$ npm install --save path-key
+```
+
+
+## Usage
+
+```js
+const pathKey = require('path-key');
+
+const key = pathKey();
+//=> 'PATH'
+
+const PATH = process.env[key];
+//=> '/usr/local/bin:/usr/bin:/bin'
+```
+
+
+## API
+
+### pathKey([options])
+
+#### options
+
+##### env
+
+Type: `Object`<br>
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
+
+Use a custom environment variables object.
+
+#### platform
+
+Type: `string`<br>
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
+
+Get the PATH key for a specific platform.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)