@axah/env-utils
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -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 @@ }; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11840