Comparing version 0.3.0 to 0.4.0
@@ -31,3 +31,4 @@ /* | ||
function parseConfig(loggerConfig) { | ||
return typeof loggerConfig === 'string' ? JSON.parse(loggerConfig) : loggerConfig; | ||
var config = typeof loggerConfig !== 'string' ? JSON.stringify(loggerConfig) : loggerConfig; | ||
return JSON.parse(config); | ||
} | ||
@@ -34,0 +35,0 @@ |
{ | ||
"name": "fh-logger", | ||
"description": "Enables a simple way of configuring and creating loggers, configured with request serializers, including clustering information.", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -40,2 +40,11 @@ /* | ||
describe('should make copy of provided config', function() { | ||
it('config should not be modified when passed to createLogger function', function() { | ||
var config = {name: 'simple'}; | ||
expect(Object.keys(config).length).to.equal(1); | ||
var logger = fh_logger.createLogger(config); | ||
expect(Object.keys(config).length).to.equal(1); | ||
}); | ||
}); | ||
describe('with Bunyan defaults', function() { | ||
@@ -42,0 +51,0 @@ var logger; |
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
37817
617