environment-configuration-resolver
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,0 +0,0 @@ { |
@@ -87,3 +87,3 @@ // | ||
let variableValue = provider.get(variableName); | ||
// Support for default variables | ||
@@ -103,18 +103,18 @@ if (variableValue === undefined && parsed.query && parsed.query.default) { | ||
switch (parsed.query.type) { | ||
case 'boolean': | ||
case 'bool:': | ||
if (currentValue) { | ||
variableValue = true; | ||
} else { | ||
variableValue = false; | ||
} | ||
break; | ||
case 'boolean': | ||
case 'bool': | ||
if (currentValue && currentValue !== 'false' && currentValue != '0' && currentValue !== 'False') { | ||
variableValue = true; | ||
} else { | ||
variableValue = false; | ||
} | ||
break; | ||
case 'integer': | ||
case 'int': | ||
variableValue = parseInt(currentValue, 10); | ||
break; | ||
case 'integer': | ||
case 'int': | ||
variableValue = parseInt(currentValue, 10); | ||
break; | ||
default: | ||
return callback(new Error(`The "type" parameter for the env:// string was set to "${parsed.query.type}", a type that is currently not supported.`)); | ||
default: | ||
return callback(new Error(`The "type" parameter for the env:// string was set to "${parsed.query.type}", a type that is currently not supported.`)); | ||
} | ||
@@ -121,0 +121,0 @@ } |
@@ -0,0 +0,0 @@ MIT License |
{ | ||
"name": "environment-configuration-resolver", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Helpful environment variable resolver for Node.js objects that performs a deep walk looking for a custom env:// scheme", | ||
@@ -21,3 +21,3 @@ "main": "lib/index.js", | ||
"contributors": [ | ||
"Wilcox, Jeff <jwilcox@microsoft.com>" | ||
"Jeff Wilcox <jwilcox@microsoft.com>" | ||
], | ||
@@ -24,0 +24,0 @@ "license": "MIT", |
# environment-configuration-resolver-node | ||
Helpful environment variable resolver for Node.js objects that performs a deep walk looking for a custom env:// scheme |
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
6723