Comparing version 7.0.0-1 to 7.0.0-2
interface CacheStorage<KeyType, ValueType> { | ||
has(key: KeyType): boolean; | ||
get(key: KeyType): ValueType | undefined; | ||
set(key: KeyType, value: ValueType): void; | ||
delete(key: KeyType): void; | ||
has: (key: KeyType) => boolean; | ||
get: (key: KeyType) => ValueType | undefined; | ||
set: (key: KeyType, value: ValueType) => void; | ||
delete: (key: KeyType) => void; | ||
clear?: () => void; | ||
@@ -7,0 +7,0 @@ } |
@@ -35,7 +35,6 @@ 'use strict'; | ||
if (typeof maxAge === 'number') { | ||
// TODO: drop after https://github.com/SamVerschueren/map-age-cleaner/issues/5 | ||
// @ts-expect-error | ||
// TODO: remove after https://github.com/SamVerschueren/map-age-cleaner/issues/5 | ||
mapAgeCleaner(cache); | ||
} | ||
// @ts-expect-error | ||
const memoized = function (...arguments_) { | ||
@@ -59,3 +58,3 @@ const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; | ||
} | ||
catch (_) { } | ||
catch (_a) { } | ||
cacheStore.set(memoized, cache); | ||
@@ -62,0 +61,0 @@ return memoized; |
{ | ||
"name": "mem", | ||
"version": "7.0.0-1", | ||
"version": "7.0.0-2", | ||
"description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", | ||
@@ -14,3 +14,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
@@ -47,9 +47,27 @@ "scripts": { | ||
"@sindresorhus/tsconfig": "^0.7.0", | ||
"ava": "^2.4.0", | ||
"@types/serialize-javascript": "^4.0.0", | ||
"ava": "^3.13.0", | ||
"del-cli": "^3.0.1", | ||
"delay": "^4.1.0", | ||
"serialize-javascript": "^2.1.0", | ||
"serialize-javascript": "^5.0.1", | ||
"typescript": "^4.0.3", | ||
"xo": "^0.25.3" | ||
"xo": "^0.33.1" | ||
}, | ||
"ava": { | ||
"files": [ | ||
"test.ts" | ||
], | ||
"timeout": "1m", | ||
"typescript": { | ||
"rewritePaths": { | ||
"./": "dist/" | ||
} | ||
} | ||
}, | ||
"xo": { | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} | ||
} |
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
14846
9
138