dobi-cache-2
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -10,6 +10,8 @@ 'use strict'; | ||
const fetch = (callback) => { | ||
const _callback = value => callback(null, value); | ||
if (fn.length === 1) { | ||
return fn(callback); | ||
fn(_callback); | ||
} else { | ||
fn(req, res, _callback); | ||
} | ||
return fn(req, res, callback); | ||
}; | ||
@@ -16,0 +18,0 @@ const asyncFetch = promisify(fetch); |
@@ -26,3 +26,3 @@ { | ||
}, | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"devDependencies": { | ||
@@ -29,0 +29,0 @@ "eslint": "^5.5.0", |
@@ -12,3 +12,3 @@ const express = require('express'); | ||
cache({ age: '5 minutes' }, (_req, _res, _next) => { | ||
_next(null, 'hello world'); | ||
_next('hello world'); | ||
})(req, res, next); | ||
@@ -15,0 +15,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21071
303
1