fable-settings
Advanced tools
Comparing version 3.0.6 to 3.0.8
{ | ||
"name": "fable-settings", | ||
"version": "3.0.6", | ||
"version": "3.0.8", | ||
"description": "A simple, tolerant configuration chain.", | ||
@@ -5,0 +5,0 @@ "main": "source/Fable-Settings.js", |
@@ -27,4 +27,3 @@ /** | ||
// If there is no pipe, the default value will end up being whatever the variable name is. | ||
let tmpDefaultValue = tmpTemplateValue.substring(tmpSeparatorIndex+1); | ||
const tmpDefaultValue = tmpSeparatorIndex >= 0 ? tmpTemplateValue.substring(tmpSeparatorIndex+1) : ''; | ||
@@ -50,2 +49,2 @@ let tmpEnvironmentVariableName = (tmpSeparatorIndex > -1) ? tmpTemplateValue.substring(0, tmpSeparatorIndex) : tmpTemplateValue; | ||
module.exports = FableSettingsTemplateProcessor; | ||
module.exports = FableSettingsTemplateProcessor; |
@@ -19,2 +19,3 @@ { | ||
"Environment": "${NOT_DEFAULT|default}-${USE_DEFAULT|default}", | ||
"EnvironmentNoDefault": "${NOT_DEFAULT}-${USE_DEFAULT}", | ||
@@ -21,0 +22,0 @@ "EnvArray": [ "${NOT_DEFAULT|default}", "${USE_DEFAULT|default}" ], |
@@ -243,2 +243,6 @@ /** | ||
.to.equal('found_value-default'); | ||
Expect(tmpFableSettings.settings).to.have.a.property('EnvironmentNoDefault') | ||
.that.is.a('string'); | ||
Expect(tmpFableSettings.settings.EnvironmentNoDefault) | ||
.to.equal('found_value-'); | ||
Expect(tmpFableSettings.settings).to.have.a.property('EnvArray') | ||
@@ -277,2 +281,6 @@ .that.is.an('array'); | ||
.to.equal('${NOT_DEFAULT|default}-${USE_DEFAULT|default}'); | ||
Expect(tmpFableSettings.settings).to.have.a.property('EnvironmentNoDefault') | ||
.that.is.a('string'); | ||
Expect(tmpFableSettings.settings.EnvironmentNoDefault) | ||
.to.equal('${NOT_DEFAULT}-${USE_DEFAULT}'); | ||
Expect(tmpFableSettings.settings).to.have.a.property('EnvArray') | ||
@@ -279,0 +287,0 @@ .that.is.an('array'); |
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
132314
1446