petty-cache
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -1,3 +0,1 @@ | ||
const util = require('util'); | ||
const async = require('async'); | ||
@@ -339,3 +337,4 @@ const lock = require('lock').Lock(); | ||
// Execute the specified function and place the results in cache before returning the data | ||
if (util.types.isAsyncFunction(func)) { | ||
if (func.length === 0) { | ||
// If the function doesn't have any arguments, there wasn't a callback provided | ||
try { | ||
@@ -351,2 +350,3 @@ const data = await func(); | ||
} else { | ||
// If the function has arguments, there was a callback provided | ||
func(function(err, data) { | ||
@@ -353,0 +353,0 @@ if (err) { |
@@ -33,3 +33,3 @@ { | ||
}, | ||
"version": "3.3.0" | ||
"version": "3.3.1" | ||
} |
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
58879
698