@emotion/weak-memoize
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,2 +6,3 @@ 'use strict'; | ||
var weakMemoize = function weakMemoize(func) { | ||
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps | ||
var cache = new WeakMap(); | ||
@@ -8,0 +9,0 @@ return function (arg) { |
@@ -6,2 +6,3 @@ 'use strict'; | ||
var weakMemoize = function weakMemoize(func) { | ||
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps | ||
var cache = new WeakMap(); | ||
@@ -8,0 +9,0 @@ return function (arg) { |
var weakMemoize = function weakMemoize(func) { | ||
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps | ||
var cache = new WeakMap(); | ||
@@ -3,0 +4,0 @@ return function (arg) { |
{ | ||
"name": "@emotion/weak-memoize", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A memoization function that uses a WeakMap", | ||
@@ -5,0 +5,0 @@ "main": "dist/weak-memoize.cjs.js", |
// @flow | ||
let weakMemoize = function<Arg, Return>(func: Arg => Return): Arg => Return { | ||
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps | ||
let cache: WeakMap<Arg, Return> = new WeakMap() | ||
@@ -4,0 +5,0 @@ return arg => { |
Sorry, the diff of this file is not supported yet
4622
81