logging-utils
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -22,5 +22,3 @@ 'use strict'; | ||
const functions = require('core-functions/functions'); | ||
const isFunction = functions.isFunction; | ||
const noop = functions.noop; | ||
function noop() {} | ||
@@ -81,4 +79,4 @@ const booleans = require('core-functions/booleans'); | ||
return isBoolean(target.warnEnabled) && isBoolean(target.infoEnabled) && isBoolean(target.debugEnabled) | ||
&& isBoolean(target.traceEnabled) && isFunction(target.error) && isFunction(target.warn) | ||
&& isFunction(target.info) && isFunction(target.debug) && isFunction(target.trace); | ||
&& isBoolean(target.traceEnabled) && typeof target.error === 'function' && typeof target.warn === 'function' | ||
&& typeof target.info === 'function' && typeof target.debug === 'function' && typeof target.trace === 'function'; | ||
} | ||
@@ -259,4 +257,4 @@ | ||
function isValidLogger(logger) { | ||
return logger === console || (logger && isFunction(logger.error) && isFunction(logger.warn) | ||
&& isFunction(logger.info) && isFunction(logger.debug) && isFunction(logger.trace)); | ||
return logger === console || (logger && typeof logger.error === 'function' && typeof logger.warn === 'function' | ||
&& typeof logger.info === 'function' && typeof logger.debug === 'function' && typeof logger.trace === 'function'); | ||
} | ||
@@ -263,0 +261,0 @@ |
{ | ||
"name": "logging-utils", | ||
"description": "Utilities for configuring simple log level based logging functionality on an object", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Byron du Preez", | ||
@@ -16,4 +16,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"core-functions": "^1.2.0" | ||
"core-functions": "^2.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# logging-utils v1.0.2 | ||
# logging-utils v1.0.3 | ||
Utilities for configuring simple log level based logging functionality on an object. | ||
@@ -126,2 +126,3 @@ | ||
- Simply set core-functions dependency to 1.1.1 | ||
### 1.0.2 | ||
@@ -131,1 +132,5 @@ - Added an explicit `configureDefaultLogging` function for clarity. | ||
- Updated core-functions dependency to 1.2.0 | ||
### 1.0.3 | ||
- Removed dependency on and replaced usage of `core-functions/functions` functions with standard JS functionality | ||
- Updated `core-functions` dependency to version 2.0.0 |
{ | ||
"name": "logging-utils-tests", | ||
"description": "Unit tests for logging-utils", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Byron du Preez", | ||
@@ -6,0 +6,0 @@ "license": "Apache-2.0", |
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
54733
135
705
+ Addedcore-functions@2.0.18(transitive)
- Removedcore-functions@1.2.0(transitive)
Updatedcore-functions@^2.0.0