New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-memoize

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-memoize - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

2

index.d.ts
type func = (...args: any) => any
export default function memoize<T extends func>(callback: T, resolver?: (...args: Parameters<T>) => string)
export default function memoize<T extends func>(callback: T, resolver?: (...args: Parameters<T>) => string): T
import memoize from './index';
const testfn = (a: string, b: number) => { return a + b}
type Fn = (a: string, b: number) => string
const testfn = (a: string, b: number) => { return a + b }
//only memoize on a

@@ -8,5 +10,5 @@ const testkey = (a: string) => a

// OK
memoize(testfn, testkey)
memoize(testfn, (a, b) => a)
memoize(() => {})
const a: Fn = memoize(testfn, testkey)
const b: Fn = memoize(testfn, (a, b) => a)
const c: ()=>void = memoize(() => {})

@@ -13,0 +15,0 @@ // not OK

{
"name": "just-memoize",
"version": "1.3.1",
"version": "1.3.2",
"description": "An implementation of the memoize technique",

@@ -5,0 +5,0 @@ "main": "index.js",

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