memcache-client-memoizer
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -15,3 +15,3 @@ export declare type InputFunction = (...args: any[]) => Promise<any>; | ||
} | ||
declare const _default: (args: IMemoizerArgs) => InputFunction; | ||
export default _default; | ||
declare const memoizer: (args: IMemoizerArgs) => InputFunction; | ||
export { memoizer }; |
@@ -20,3 +20,3 @@ "use strict"; | ||
}; | ||
exports.default = (args) => { | ||
const memoizer = (args) => { | ||
const { client, clientProviderFn, fn, keyFn, setOptions = {}, cacheResultTransformFn = (x) => x } = args; | ||
@@ -38,2 +38,3 @@ const localClient = getClient(client, clientProviderFn); | ||
}; | ||
exports.memoizer = memoizer; | ||
//# sourceMappingURL=index.js.map |
@@ -33,3 +33,3 @@ export type InputFunction = (...args: any[]) => Promise<any>; | ||
export default (args: IMemoizerArgs): InputFunction => { | ||
const memoizer = (args: IMemoizerArgs): InputFunction => { | ||
const {client, clientProviderFn, fn, keyFn, setOptions = {}, cacheResultTransformFn = (x: any) => x} = args; | ||
@@ -55,1 +55,3 @@ const localClient = getClient(client, clientProviderFn); | ||
}; | ||
export {memoizer}; |
{ | ||
"name": "memcache-client-memoizer", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Memoizes promise-returning functions via memcache-client", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -44,3 +44,3 @@ ## memcache-client-memoizer | ||
const MemcacheClient = require('memcache-client') | ||
const memoizer = require('memcache-client-memoizer') | ||
const { memoizer } = require('memcache-client-memoizer') | ||
@@ -47,0 +47,0 @@ const fnToMemoize = ({ name, color }) => Promise.resolve({ name, color }) |
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
125113
94