cleaner-node
Advanced tools
Comparing version 0.11.6 to 0.11.7
{ | ||
"name": "cleaner-node", | ||
"version": "0.11.6", | ||
"version": "0.11.7", | ||
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -43,3 +43,3 @@ "main": "index.js", | ||
"md5-file": "^5.0.0", | ||
"moment": "^2.28.0", | ||
"moment": "^2.29.0", | ||
"semver": "^7.3.2", | ||
@@ -58,3 +58,3 @@ "uuid": "^8.3.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.20.6", | ||
"eslint-plugin-react": "^7.21.0", | ||
"eslint-plugin-react-hooks": "^4.1.2", | ||
@@ -61,0 +61,0 @@ "eslint-plugin-standard": "^4.0.1" |
@@ -42,2 +42,17 @@ const path = require('path'); | ||
const importProcess = () => { | ||
Object.keys(process.env) | ||
.filter(key => (isValidString(key) && key === key.toUpperCase())) | ||
.filter(key => (isValidString(process.env[key]) || isNumber(process.env[key]) || isValidBool(process.env[key]))) | ||
.forEach(key => { | ||
if (isValidBool(process.env[key])) { | ||
me[key] = ifValidBool(process.env[key]); | ||
} else if (isNumber(process.env[key])) { | ||
me[key] = Number(process.env[key]); | ||
} else if (isValidString(process.env[key])) { | ||
me[key] = process.env[key].trim(); | ||
} | ||
}); | ||
}; | ||
const setDefaults = () => { | ||
@@ -65,2 +80,5 @@ | ||
importProcess(); | ||
setDefaults(); | ||
me.applyDefaults = defaults => { | ||
@@ -75,3 +93,3 @@ | ||
.filter(key => (isValidString(defaults[key]) || isNumber(defaults[key]) || isValidBool(defaults[key]))) | ||
.filter(key => (notDefined(me[key]) && notDefined(process.env[key]))) | ||
.filter(key => (notDefined(me[key]))) | ||
.forEach(key => { | ||
@@ -78,0 +96,0 @@ if (isValidBool(defaults[key])) { |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
77311
1950
15
Updatedmoment@^2.29.0