@axah/env-utils
Advanced tools
@@ -23,2 +23,6 @@ "use strict"; | ||
| const getDevValueOrThrowError = (key, valueInDev) => { | ||
| if (!process.env.NODE_ENV) { | ||
| throw new Error('The environment variable NODE_ENV is not set. The package axah/env-utils only works with a defined NODE_ENV.'); | ||
| } | ||
| if (process.env.NODE_ENV !== 'development') { | ||
@@ -28,6 +32,2 @@ throw new Error(`The environment variable ${key} has not been defined or is empty.`); | ||
| if (valueInDev === undefined) { | ||
| throw new Error(`The dev-environment variable ${key} has not been defined.`); | ||
| } | ||
| return valueInDev; | ||
@@ -34,0 +34,0 @@ }; |
+1
-1
| { | ||
| "name": "@axah/env-utils", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "main": "lib/main.js", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
Sorry, the diff of this file is not supported yet
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
11840
0.82%12
9.09%