Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mem

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem - npm Package Compare versions

Comparing version 7.0.0-1 to 7.0.0-2

8

dist/index.d.ts
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"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc