properties-reader
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "properties-reader", | ||
"description": "Properties file reader for Node.js", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Steve King", |
@@ -99,3 +99,3 @@ (function() { | ||
} | ||
else { | ||
else if (typeof value === "string") { | ||
var replacements = {'\\n': '\n', '\\r': '\r', '\\t': '\t'}; | ||
@@ -102,0 +102,0 @@ parsedValue = value.replace(/\\[nrt]/g, function (key) { |
@@ -118,3 +118,11 @@ | ||
Assertions.assertEquals(properties.path().some.property, 'Multi\\n Line \\nString', 'Sets all properties'); | ||
}, | ||
'test Returns null when getting a missing property': function () { | ||
var properties = givenFilePropertiesReader('prop = value'); | ||
// parsed access modifies the new line characters | ||
Assertions.assertEquals(properties.get('prop'), 'value', 'Gets values that are present'); | ||
Assertions.assertEquals(properties.get('missing'), null, 'Gets null for values that are missing'); | ||
} | ||
}); |
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
21259
400