Socket
Socket
Sign inDemoInstall

@emotion/weak-memoize

Package Overview
Dependencies
0
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.5 to 0.3.0

dist/declarations/src/index.d.ts

22

package.json
{
"name": "@emotion/weak-memoize",
"version": "0.2.5",
"version": "0.3.0",
"description": "A memoization function that uses a WeakMap",
"main": "dist/weak-memoize.cjs.js",
"module": "dist/weak-memoize.esm.js",
"main": "dist/emotion-weak-memoize.cjs.js",
"module": "dist/emotion-weak-memoize.esm.js",
"types": "types/index.d.ts",
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/master/packages/weak-memoize",
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/weak-memoize",
"scripts": {

@@ -17,3 +17,4 @@ "test:typescript": "dtslint types"

"devDependencies": {
"dtslint": "^0.3.0"
"@definitelytyped/dtslint": "0.0.112",
"typescript": "^4.5.5"
},

@@ -23,8 +24,11 @@ "files": [

"dist",
"types"
"types/*.d.ts"
],
"browser": {
"./dist/weak-memoize.cjs.js": "./dist/weak-memoize.browser.cjs.js",
"./dist/weak-memoize.esm.js": "./dist/weak-memoize.browser.esm.js"
"exports": {
".": {
"module": "./dist/emotion-weak-memoize.esm.js",
"default": "./dist/emotion-weak-memoize.cjs.js"
},
"./package.json": "./package.json"
}
}
// @flow
let weakMemoize = function<Arg, Return>(func: Arg => Return): Arg => Return {
let weakMemoize = function <Arg, Return>(func: Arg => Return): Arg => Return {
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps

@@ -4,0 +4,0 @@ let cache: WeakMap<Arg, Return> = new WeakMap()

@@ -0,1 +1,3 @@

// TypeScript Version: 2.2
type UnaryFn<Arg, Return> = (arg: Arg) => Return

@@ -2,0 +4,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc