async-deco
Advanced tools
Comparing version 9.1.4 to 9.1.5
@@ -17,2 +17,4 @@ "use strict"; | ||
const noop = () => {}; | ||
function addLogger(log) { | ||
@@ -38,3 +40,4 @@ if (!log) throw new Error('addLogger: You must have a log function as argument'); | ||
function getLogger(context) { | ||
return logFunctions.get(context) || (() => {}); | ||
if (!context) return noop; | ||
return logFunctions.get(context) || noop; | ||
} |
@@ -39,2 +39,4 @@ "use strict"; | ||
var noop = function noop() {}; | ||
function addLogger(log) { | ||
@@ -66,3 +68,4 @@ if (!log) throw new Error('addLogger: You must have a log function as argument'); | ||
function getLogger(context) { | ||
return logFunctions.get(context) || function () {}; | ||
if (!context) return noop; | ||
return logFunctions.get(context) || noop; | ||
} |
{ | ||
"name": "async-deco", | ||
"version": "9.1.4", | ||
"version": "9.1.5", | ||
"description": "A collection of decorators for adding features to asynchronous functions", | ||
@@ -5,0 +5,0 @@ "main": "es5/index", |
Sorry, the diff of this file is not supported yet
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
219536
5479